Jump to content

redirect confusion


envexlabs

Recommended Posts

Hey,

 

I know how to redirect using header(), but i have a quick question.

 

I know that you have to send the redirect before all the header information, but if i have a form being processed halfway down  the page  via, $_SESSION[php_self], how do i go about redirecting after the form has been processed?

 

Thanks,

 

envex

Link to comment
https://forums.phpfreaks.com/topic/71978-redirect-confusion/
Share on other sites

<?

$username = $_post['username'];
$password = $_post['password'];

if (isset($username) && isset($password)) {
   mysql_query(update db set password = '$password', username = '$username' where id = userid);
}

header ("location:http://www.site.sufix/folder");

?> 

 

This is the way to redirect such a script

Link to comment
https://forums.phpfreaks.com/topic/71978-redirect-confusion/#findComment-362562
Share on other sites

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.