hi,
i am working on a db program. in the enterance page it is asking user to enter a password for mysql.
and in the second page it is trying to connect to mysql with this password
i want to bring the user to the error page (err.php) when the password is wrong
and when the passwd is true i want to bring the user to the success page (index_main.php)
i am trying a argument like that:
if(!($dp=mysql_connect("localhost","root",$passwd)))
{
header("Location:err.php");
}
else {
header("Location:index_main.php");
}
note: in here $passwd is the password taken from the enterance page...
when i try to run it and enter a wrong password it doesn't go to err.php
instead of going err.php it is viewing mysql error message
what could i do?
thanks from now for your answers
best regards