PDA

View Full Version : HTTP_REFERER Questions



SChaput
12-01-2008, 01:38 AM
I have a script that puts many variables into the URL, these variables are then called on another page to perform some mysql querys. For example:
My first page is www.someurl.com/id=$id&postID=$postID.
My second page uses those variables to delete an entry from my database. and echos "Row Deleted. Click here to go back.
I want to make a link on the 2nd page that redirects the user back to the first page's URL.
Maying im making this more complicated then it needs to be.
Thanks for your help.

Twey
12-01-2008, 06:36 AM
No, quite the opposite. It actually needs to be slightly more complicated, because the REFERER is not always sent reliably. You'll need to pass the first page's URL in the POST request you're using to delete the row.

SChaput
12-01-2008, 02:12 PM
Are there other ways to achieve the same goal? Something that is more reliable?

Twey
12-02-2008, 10:28 AM
You'll need to pass the first page's URL in the POST request you're using to delete the row.