I have a form which updates some info in a DB. Currently the user does a search, which will load up results, which the user can change, and then submit those changes back into the DB.
I'm attempting to make it that after submitting data successfully that the search results load back up right away, so the user doesn't have to put in search criteria again.
Results are held in a $result variable :
Expand|Select|Wrap|Line Numbers
- $result = search($_POST['f_name'], $_POST['l_name'], $_POST['sub'], $_POST['des'], $_POST['id'], $_POST['u_id'], $cat, $s_date, $e_date);
Before I iterate through $result I pass it into another variable, which i then pass along as a $_POST variable (lets call it new_result) as the user hits submit which sends the data into another function which actually updates in the information.
My problem is that if I echo my $_POST['new_result'] it gives me "Resource ID#6" which is my expected result, but if I now try to traverse that Resource ID by passing it back into my edit_tables function, I get the error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /web/apache/htdocs/folder/folder/dev/file.php on line 46
Can anyone point out what I'm doing wrong or recommended a better way to do this?