如何用相应的数据填充多个文本输入字段,只执行一次php-mysql查询脚本? 例如jquery php json示例
<form name="video" action="mysql.php" method="post" enctype="multipart/form-data" target="videofrm">
<p>
<label for="url">url/gallery:</label><input class="text" type="text" id="url" name="url"/>
<input id="favorite" class="text" type="checkbox" name="favorite" value="true"/>
<label for="favorite" class="noneFloat">favorite</label>
</p>
<p>
<input id="thumb" type="file" name="thumb"/>
</p>
<p>
<label for="title">title:</label><input class="text" type="text" id="title" name="title"/>
</p>
<p>
<label for="desc">description:</label><input class="text" type="text" id="desc" name="description"/>
</p>
<p>
<label for="country">country:</label><input class="text" type="text" id="country" name="country"/>
</p>
<p>
<label for="categories">categories:</label><input class="text" type="text" id="categories" name="category"/>
</p>
<input type="button" value="fetch" id="fetch"/>
<input type="reset" value="clear"/>
</form>
我需要填充与输入文本字段:
select url,title,desc,country,category
from video where url='something';
首先,我需要知道如何使返回JSON数据类型写这种PHP脚本,事后如何填充文本输入字段,使用jQuery,并返回数据。
`非常感谢
这需要大量的澄清才能负责。你问如何填充数据库值的文本输入? – 2011-05-08 12:11:15
什么部分不清楚给你?它说php-mysql查询脚本,这当然不是来自我的日记伙计。当然这是一个有问题的数据库。 – 2011-05-08 12:17:14
你知道任何PHP或JavaScript吗?如果没有,阅读一些教程将是一个好的开始。我们不会只为你做你的工作...... – 2011-05-08 12:46:49