PHP形式的动态条件/标准 [英] Dynamic Conditions/Criteria in PHP form
本文介绍了PHP形式的动态条件/标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个:
展开 | 选择 | Wrap | 行号
推荐答案
我想知道如何通过点击获得新的标准行
然后所有标准行应该保存到他们的变量!所以我可以稍后在sql查询语句中使用它们后面的单词WHERE
我必须使用java脚本! ..或者我必须使用PHP功能!或多个形式的子项!! ..
I''m wondering how can i by a click have a new criteria line
then all criteria lines should be saved to thier variables ! so i can use them later inside a sql query statement after the word "WHERE"
do i have to use java script ! .. or do i have to use php functions ! or multiple forms submitions !! ..
Heya,coool。
要实际创建输入,您需要使用JavaScript。
但是如果你将它们命名为criteria [],field []等,那么PHP将自动创建数组,这样你就不必跟踪各个变量名。
欲了解更多信息,请查看此页面:
http://php.net/manual/en/language.va....php#id2536797
Heya, coool.
To actually create the inputs, you''ll need to use JavaScript.
But if you name them criteria[], field[], etc., then PHP will automatically create arrays so that you don''t have to keep track of individual variable names.
For more information, check out this page:
http://php.net/manual/en/language.va....php#id2536797
好吧,我已经尝试了隐藏元素的技术
,因为我只想要10个标准行
所以我显示了一个..并使用CSS隐藏了9行
现在当用户点击ADD CRITERIA ROW时
应该有一个javascript函数可以更改要显示的元素
我的问题现在这个javascript函数:(
i ''正在使用< tr>不是< div> -----因为< div>我无法隐藏使用CSS - 我不知道为什么!
所以你有任何改变的< tr>的javascript函数显示!
well, I''ve tried the technique of hidden elements
because I only want 10 criteria rows
so I displayed one.. and make 9 rows hidden using CSS
now when user click on "ADD CRITERIA ROW"
there should be a javascript function that change the element to display
my problem now with this javascript function :(
i''m using <tr> not <div> ----- becuase with <div> i couldn''t hide using css - i don''t know why !
so do you have any javascript function that change <tr> to show !
这篇关于PHP形式的动态条件/标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文