How to change Server.Transfer code to PHP redirect code with member_id
I have a code in VB that looks like this:
'Server.Transfer(txtUser.Text + "_page.aspx")
which is taking a forms authenticated user to their page. For example if John logs in, it will take him to john_page.aspx.
H开发者_如何学编程ow will I be able to integrate this in a PHP login script? I'm trying something like:
header("location: $member . _page.php");
but I don't think I'm doing this correctly. I'm not sure if this is just the wrong syntax or if I'm going about it the wrong way.
Any help is appreciated!
$page = "_page.php";
header("Location: http://example.com/".$page);
exit();
You need to use the full URL if you want to redirect using header().
精彩评论