Hey Everyone
I’m very new to Php code and I need to redirect users of a website to the Home page once they have logged in.
I’m trying to create a car rental website so what needs to be done in order to make it work.
[php]
//get the number of rows in the result set: should be 1 if a match
if (mysqli_num_rows($result) == 1) {
//if authorized, get the values of f_name 1_name
while ($info = mysqli_fetch_array($result)) {
$f_name = stripslashes($info['Username']);
//$1_name = stripslashes($info['1_name']);
}
//set authorisation cookie
setcookie("auth", "1");
header("Location: home.php");
die();
}
[/php]
Any help would be appreciated.