I've written a php script that displays a summary table with certain select information from a database table. It has a "view" button next to each row, which takes the user to a printable form with the complete information from the table on it. There is a portion on this form where the user can add more information to the form. The user clicks a button on the form, and a small window pops up, with a text area and a submit button. It all works fine and dandy, the information gets submitted to the table, and the little window dissapears. Only problem is, you have to refresh the page to see the data relfected on the screen.
My qustion is, how can I get it to automatically refresh that page so that the information will show, without them having to resend the data from the table? Here's the code for the popup window:
<? echo "<img src=\"someimage.jpg\"></img><br>"; echo "<br> Type your notes below and click \"Submit.\" <form method=post action=update_notes.php> <textarea name=\"notes\" rows=\"5\" cols=\"30\"></textarea><br> <input type=hidden name=request_id value=" . $_POST['request'] . "> <input type=submit value=submit> </form>"; ?>
As you can see, it uses some information from the previous page to tell the mysql database which row to post the data on.
So somehow I was think that when the user clicks that submit button, it would post the notes to "update_notes.php", but then it would also reload the "print_forms.php" page while passing the requestid to it, so it knows what data to load it with. Ideas?
I know I've been mostly a leech on this forum, and haven't been able to contibute much yet. But I promise as I get more experienced I will contribute! Thanks for all your help!