Can I post data using header function ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aneuryzma
Forum Contributor
Posts: 106
Joined: Sat May 17, 2008 7:03 am

Can I post data using header function ?

Post by aneuryzma »

Can I post data using header ?

I need to post this variable: $phpro_username

Code: Select all

header( 'refresh: 1; url=login_submit.php')
;

This is requested in login_submit.php:

Code: Select all

$_POST['phpro_username']
thanks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can I post data using header function ?

Post by requinix »

You cannot.

My advice is for your login_submit.php page to use $_REQUEST instead of $_POST. Then you can put the username into the URL.
Post Reply