MySQL / PHP
Posted: Wed Aug 11, 2004 1:29 pm
I am running php and MySQL. If I run MySQL at cmd command prompt or through windows explorer, it works, I can create database, tables, insert data, etc. Here no problem, it works.
But when I am running the following code, just to make sure I am connected to the database, it does not work. When I run the following code, no error messages or not even 'success' message. Blank white
screen pops up. Even I refreshed id. Same.
Also, when I run phpInfo(), it works fine. Shows all the info.
Can anybody help me to fix this please.
I am running Windows 2000, IIS.
<?
$connection = @mysql_connect("d2rsyc11","myUN","myPW") or die(mysql_error());
if ($connection) {
$msg = "success!";
}
?>
<? echo "$msg"; ?>
But when I am running the following code, just to make sure I am connected to the database, it does not work. When I run the following code, no error messages or not even 'success' message. Blank white
screen pops up. Even I refreshed id. Same.
Also, when I run phpInfo(), it works fine. Shows all the info.
Can anybody help me to fix this please.
I am running Windows 2000, IIS.
<?
$connection = @mysql_connect("d2rsyc11","myUN","myPW") or die(mysql_error());
if ($connection) {
$msg = "success!";
}
?>
<? echo "$msg"; ?>