mysql_connect() does connect to MySQL
I am in a terrible situation. My PHP works with MySQL database when I use MySQLi connection code, but when I try to connect the database using
<?php
mysql_connect("localhost", "admin", "1admin") or die(mysql_error());
echo "Connected to MySQL<br />";
?>
I don't get any error message. Rather the browser just goes offline or error message. I have been trying to figure this out for two weeks.
In my PHP both MySQL and m开发者_Python百科ysqli lines are uncommented. I am using Windows 7 64 bit.
Try using 127.0.0.1 instead of localhost.
精彩评论