Hi
I was wondering how to set up an auto redirect if person refreshes page.
I have a page "view.php" which is in a pop-up window. on this page is a link to "dosomething.php". when the user goes to both these pages it has an image on it (which is being read from a mysql table). When the user clicks on the link for "dosomething.php" the info (image,image title,ect..) is deleted from the mysql table.
but if (and it happens) the user tries to refresh "dosomething.php" or click to go back to "view.php" the image won't show up cause by then it has been deleted from the mysql table. It looks untidy and horrible cause not all the info is there and its showing a broken image.
What I need to know is how can I create a script so that if the user refreshes the page it automatically takes them to a page called "Notthere.php" that says "Error, that item is no longer valid for viewing"
I tried using cookies, but it didn't work out for me cause everytime i went back to "view.php" at a later time it would immediately redirect to "Notthere.php".
I am desperate!! Please somebody just help me a little. I will be so grateful!

|