I need to create a form for the field:
id
After entering the value for the id, the id needs to be matched in Database and the values obtained from the Database should be filled in the other forms.
i.e., the value of the title from the database should be filled in title form(input type=”text”) of the html.
this title field will also be present on the same page of the id field.
i.e., there will be a id field followed by a submit button after submitting the id the associated values of the id will be fetched and will be filled in the other form structures on the same page.
Can you suggest me how to do this.
Help appreciated and thanks for u r time.
Use
jQuery.ajaxto perfrom ajax request, than render the response as you need. Here is an example:In your backend you’ll have to use
json_encodeto have data encoded in json-compatible way. Here is an example:See jQuery.ajax, PHP json_encode for details.