please i am getting this error : Fatal error: Call to undefined function redirect_to() in /home/reachea2/public_html/relogin.php on line 31(the login is meant to reirect to the index page)
<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
if ($username&&$password)
{
$connect = mysql_connect("localhost","reachea2","HYW6QwoV")
or die("couldn't connect!");
mysql_select_db("reachea2_registeringmembers") or die ("couldn't find db");
$query = mysql_query("SELECT * From reusers WHERE username='$username'");
$numrows =mysql_num_rows($query);
if($numrows!=0)
{
while ($row = mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
// chect to see if they match!
if ($username==$dbusername&&md5($password)==$dbpassword)
{
//echo " You are in! <a href='remembers.php'>Click</a> here to enter the member page";
//echo " You are in! <a href='index.html'>Click</a> here to enter the member page";
redirect_to('index.html');
$_SESSION['username']=$username;
}
else
echo " incorrect password!";
}
}
else
die("That user dosen't exist!");
}
else
die("Please enter a username and a password");
?>