How do I populate several text input fields with corresponding data, executing php-mysql query script once only? e.g.
<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>
I need to populate input text fields with:
select url,title,desc,country,category
from video where url='something';
First I need to know how to write this kind of php script so it returns json datatype, and afterwards how to populate text input fields, using jquery, with returned data.
`many thanks