Jump to content

header() and $_POST question


TempleDMDKrazd

Recommended Posts

I know there are two types of HTTP request methods GET and POST. GET is embedded into the URL while POST is embedded into the http request itself. the thing is in my PHP code for me to relocate the user to another page i use the following function:

 

header("Location: somepage.php?status=T");

 

it passes the status variable ($_GET["status"]) by GET to somepage.php. is there a way where I can pass it by POST in my PHP code or is there a function similiar to header that I can pass it by POST?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/116682-header-and-_post-question/
Share on other sites

i enable sessions and then

 

i write $_POST['status'] = $_SESSION['status']

 

EDIT: dont know about security of that though, lemme know somebody if this is really bad

 

an interesting approach, unconventional, but not insecure.

 

i can't use $_SESSION because the person is logging out and I want to pass some variables to the receipt logout page, but I don't want to pass it in the URL.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.