hello guys , this is my code which i am trying to use to sign up to test my database connection, so usually when i try to sign up it tells me there is something wrong on line 11 any way this is the code
<?
$mysql_host = "mysql9.000webhost.com";
$mysql_database = "a2354076_post";
$mysql_user = "username";
$mysql_password = "*****";
$tbl_name = "admins";
$myusername =$_POST['username'];
$mypassword = $_POST['password'];
$name=$_POST['name'];
$email=$_POST['email'];
mysql_connect("$mysql_host","$mysql_user","$mysql_password")or die ("cannot connect to DB");
mysql_select_db ("$mysql_database")or die('can not connet to database , please try again later');
$sql="INSERT INTO $tbl_name (name, username, passwrod, email) values ('$name','$myusername','$mypassword','$email')";
$result= mysql_query($sql);
if($result)
{
echo "successful operation, you can access to your admin at any time | by Awah mohamad";
}
else
{
echo "please try again because a error has happened ";
}
include('db/mysql_close.php');
?>
and this is the out put
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a2354076_admin'@'10.0.0.24' (using password: YES) in /home/public_html/admin/sign_up/sign_up_prog.php on line 11
Free Web Hosting
cannot connect to DB