redirect upon successful login php

Instead of saying “

here it is

” can anyone tell me how to make a successful login redirect to another page? Thanks

$row = mysqli_fetch_row($result);
$count = $row[0];

if ($count > 0) {
  // visitor's name and password combination are correct
  echo "<h1>Here it is!</h1>
        <p>I bet you are glad you can see this secret page.</p>";
} else {
  // visitor's name and password combination are not correct
  echo "<h1>Go Away! <a href='http://phptutorials.info/login/signup.html'>Sign Up Here</a></h1>
        <p>You are not authorized to use this resource.</p>";
}

}
?>

replace the h1 here it is with a php header like this
[php]
header(“location: index.php”);
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service