PHP动态表单。 [英] PHP Dynamic Form.

查看:57
本文介绍了PHP动态表单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个小问题,我根本找不到任何地方的答案,第一个,只有小。


我的数据库将数据库中的项目打印到选择框中,这给了我空白的选项,即使数据库中没有,我记得以前遇到过这个问题但是不记得如何绕过它?


其次在同一个表格上我想要另一个下拉字段根据所选择的内容进行更改,例如客户选择产品,可用金额存储在数据库中,所以我想要一个数量下拉,显示从1到可用金额。
网页

展开 | 选择 | 换行 | 行号

解决方案


我有两个小问题我根本无法找到答案,第一个,只有小。


我的数据库打印出来的项目数据库进入一个选择框,这给了我空白的选项,即使数据库中没有,我记得之前有这个问题,但不记得如何解决它?


其次同样的形式我希望另一个下拉字段根据所选择的内容进行更改,例如客户选择产品,可用金额存储在数据库中,所以我想要一个数量下拉,显示从1到可用金额。
网页

展开 | 选择 | 换行 | 行号


< blockquote>这就是我正在使用的东西,似乎工作正常,除了上面列出的东西..


大家好,


mysql_numrows()是mysql_num_rows()的弃用别名。


理想情况下你应该转向使用mysql_num_rows()。


现在我要看看你的问题..

问候紫色


I have two slight problems I simply cant find an answer to anywhere, the first, only small.

I have my database printing out items from a database into a select box, this is giving me blank options even though there are none in the database, I remember having this problem before but cant remember how to get around it?

Secondly on the same form I would like another drop down field to change according to what is selected e.g. customer selects product, amount availible is stored in the database so I would like a qty drop down that will display from 1 upto the amount availible.
The Webpage

Expand|Select|Wrap|Line Numbers

解决方案

I have two slight problems I simply cant find an answer to anywhere, the first, only small.

I have my database printing out items from a database into a select box, this is giving me blank options even though there are none in the database, I remember having this problem before but cant remember how to get around it?

Secondly on the same form I would like another drop down field to change according to what is selected e.g. customer selects product, amount availible is stored in the database so I would like a qty drop down that will display from 1 upto the amount availible.
The Webpage

Expand|Select|Wrap|Line Numbers


Thats exactly what I''m using and seems to work fine, well apart from the things listed above..


Hi all,

mysql_numrows() is a deprecated alias of mysql_num_rows().

You should ideally move towards using mysql_num_rows().

Now I am going to take a look at your problem..

Regards Purple


这篇关于PHP动态表单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆