create $host localhost

[php]
$host=http://localhost/mysite1;

$con=mysql_connect(“localhost/mysite1”,“user”,“user1”);
if($con)
{
echo “connected successfully”;
}

[/php] then where to navigate this code
had created phpmyadmin tables for sql but some connection problem with 404 error pls clear this

thanks
in advance

Discard the code and start again, the mysql_* library is deprecated and will be removed from PHP. Find a starter tutorial for PDO or Mysqli and come back if you have any problems :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service