I'm really not sure of the best way to do this. I am thinking that going with a cookie is the best way.
Anywhere, here's what I am doing:
I am taking an Access Employee Phone List database, and putting it online by bringing it into MySQL and using PHP to do the forms. Plain and simple. I've gotten it to do quite a bit of things (considering this is my first MySQL and PHP experience). I've worked in adding people, deleting people, and modifying people, as well as some decent search options.
I have 4 PHP files. the index which does the main form as well as authentication. add.php which only adds records and checks for dupes at the same time. phone_list.php will run the query and show the results of the search. modify.php which does the deleting and modifying of records, this page is linked from phone_list.php.
Here's the problem:
When I modify a record, I have it just display a page saying that it worked, and have a link to the main page. What I want is it to dump me back to the phone_list.php and re-run the search.
I can't get it to do this. I tried passing the search string from phone_list.php but it won't pass. I've tried to urlencode() it, but that just add's more %'s and messes up the printf that displays the table.
I was thinking I could create a cookie when the user submits a search in the index.php that stores the search string. I can refer to this throughout the user's visit (or until they run another search).
I just want to do something simple (or that's how I see it). If anyone can understand my explanation (as poor as it is).
Basically I just want it to rerun the search but I don't know how to get the search string to propagate through the pages and back to where I need it.