Page crashes at mysql_connect.
Posted: 18. November 2007 06:50
Basically I'm running Xampp it says I have the driver 3.51 installed now, but for some reason this code below only displays test once. While if I get rid of everything else but the echo statements it will display testtest.
So to be clear, there are no errors displayed on die, and the program just crashes because of the fact that I call mysql_connect is there something I need to do to xampp before I can get mysql to connect?
So to be clear, there are no errors displayed on die, and the program just crashes because of the fact that I call mysql_connect is there something I need to do to xampp before I can get mysql to connect?
- Code: Select all
<HTML><Head><title></title></head><body>
<?php
echo "test";
$con = mysql_connect("localhost","admin","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
echo "test";
?>
</body></HTML>