Link to home
Start Free TrialLog in
Avatar of mrbinky3000
mrbinky3000

asked on

Redirect POST and URL at same time

I'm developing a simple class for doing basic editing on a MySQL table. By basic, I mean edit the values in a row, delete a row, or just view a row. My script creates an HTML table to display what's in the MySQL table. The last column in each row in the HTML table is a form with a dropdown box and some hidden variables. The action of each form is $PHP_SELF

I want to redirect the POST variables AND the browser to a new URL at the same time.  If the user selects "edit" from the dropdown box, they should be redirected to edit.php and the hidden varables I mentioned need to be redirected as well. One of the hidden post variables edit.php uses is the primary key for the row that the user wishes to edit.

I need to do it this way because in the class I'm writing, the user can specify the URL to handle certian actions. You also get to specify the actions that get in the dropdown box. If I get this to work, it will make this class very flexible for my future projects. I'd also be willing to share it.

I need to use POST to keep the user from figuring out what info is beind sent by looking at the URL in their brower's address bar. For security reasons, I've disabled GET and turned off global vars.

I've seen suggestions that involve using urlencode... but this won't work since a user can just copy and paste the encoded URL into another program that uses urldecode. Not safe.

I've seen solutions on the web that redirect the POSTed variables. I also know how to redirect browsers with the use of php's header tag. What I need is a solution that encompases both of these at the same time.

Thanks in advanced for your help!
ASKER CERTIFIED SOLUTION
Avatar of Tidikay
Tidikay

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: Tidikay {http:#8100433} & waygood {http:#8161758}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

snoyes_jw
EE Cleanup Volunteer