Connecting to mysql withh PHP
Hi I've got Apache2.2.9, PHP 5.2.6 and Mysql5.0.6 running fine on my machine under windows XP media center 2005. but each time I try to connect to Mysql with php, nothing happens, the browser seems to ignore all the lines of my program starting form the line "$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to" mysql'); it works until that line, but after that line nothing happens and it doesn't connect to mysql. the code I' using is below:
<html>
<body>
<?php
$dbhost = 'http://localhost';
$dbuser = 'ramon';
$dbpass = 'mypasword';
print 'here it is going to try to connect to mysql';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
print 'Connected to mysql';
$dbname = 'dados';
mysql_select_db($dbname);
?>
<br>
end of program
</body>
</html>
I doesn't show "Error connecting to mysql" or "Connected to mysql" not either " End of Program". Does anyone know where might be the problem? Does Mysql run with apche on windows? help me please.
ramon
|