I am a WAMP newbie and would appreciate your help! I have installed Apache 2.2.4, Mysql 5 and PHP 5 have got them all up and running and tested them separately, I was able to do the info.php test to display environment variables in a browser successfully. I tried to test a connection to mysql using the following code:
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <title>mysql connection test</title>
- </head>
- <body>
- <h2>
- <p>Testing now!</p>
- <?php
- $dbhost = 'localhost';
- $dbuser = '**********';
- $dbpass = '**********';
- $connection = mysql_connect($dbhost, $dbuser, $dbpass)
- or die ("Sorry - unable to connect" . mysql_error());
- echo ("Congrats - connection established");
- ?>
- </h2>
- </body>
- </html>
which is I understand is fairly standard code to test a connection with (the **** fields actually contain my username and password :)
When i run this through a browser all I get returned is the "Testing now!" from the html - no errors - nothing!
I do have error reporting turned on in the php.ini file (error_reporting = E_ALL & ~E_NOTICE)
Any ideas people??
thanks,
obmij