Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.