EDIT:
I will try to explain what I want to do a bit better. I am displaying a table with all the fields retrieved from a database using an ajax call to a php file (eg. other.php) in my main.php. What I am trying to figure out is once the table is displayed to screen and the call is in the other.php file, can I implement an update query within other.php to update a field in the database with a user input? Does that make sense?
Thanks.
EDIT: I will try to explain what I want to do a bit better.
Share
Yes, it’s possible. Assuming that you have a form that the user fills before clicking in the menu, you can add this values in your ajax call.
For example, assuming that you have a search button
You can pass this to your php with
getorpost(type of request)And in your
somefile.phpyou can access the value with$_POST['search']or$_GET['search'](depending of the type of the request).I think with this you can adapt to your reality. More samples you can get in the JQuery docs.