This is what Im doing:
PHP Code:echo "1";
$con = mysql_connect($c,$l,$p);
echo "2";
if ($con) { echo "connected!"; }
if (!$con)
{
echo "No Go";
die('Could not connect: ' . mysql_error());
}
All I see is '1' and no other output. What could be wrong?
Printable View
This is what Im doing:
PHP Code:echo "1";
$con = mysql_connect($c,$l,$p);
echo "2";
if ($con) { echo "connected!"; }
if (!$con)
{
echo "No Go";
die('Could not connect: ' . mysql_error());
}
All I see is '1' and no other output. What could be wrong?
mysql_connect must be throwing a fatal error, but you've got error reporting off.
Place this line before the rest of your code:
Alternatively, suppress the error by prepending the error control operator @ before the call to mysql_connect().PHP Code:error_reporting(E_ALL ^ E_STRICT);
PHP Code:$con = @mysql_connect($c, $l, $p);