-->

useful-article.blogspot.com


Welcome to useful-article.blogspot.com, a blog on Computer tips and tricks. I will update new and latest Computer tips here. All Hacking Tips will also be posted.Beware, this site does not contain any virus or malware, all tips are safe and hacking here is only intended for hacking your own computer for speed and more advanced functionality. All the Computer tips will be helpful for beginners as well as advanced.

Redirecting To A Page After Login In PHP

t's sometime needed to redirect to a page if some
conditions are met.you may include a auth.php page in any
page.this auth.php handles login and if login username
and password are matched then the user will be redirected
to the member home page using 'header' - the codes shown -
Collapse
if($password == $passwordtext)
{
$_SESSION["userid1"] = $id1;
header("Location: https://mysite.com
/members/index.php"); // redirects
}
else
{
unset($_SESSION["userid1"]);
$_SESSION["msg"] = "<li>Login Info - Username
/Password:  Incorrect Combination try again</li>";
}
0 Komentar untuk "Redirecting To A Page After Login In PHP"