i'm a newbie to php, but a relatively experienced coder, so feel free to be technical.
i've installed apache, php and mysql.
my php script (embedded in html) is as follows:
Code: Select all
<?php
echo "before";
$connection = mysql_connect("localhost", "root", "mypassword") or die("Failed to connect to database: " . mysql_error());
echo "Connected to database.";
?>but nothing gets printed out from the die message, so i have no clue how to troubleshoot it.
phpinfo(); returns the php settings so i know ive configured php fine.
also i followed a mysql installation tutorial step by step and have created tables and populated them, so thats working fine.
any ideas?
thanks.