<?php $host = "localhost"; $user = "username"; $password = "password";
I get an error saying connection failed. what am i doing worng?
echo your data right before the call to make sure it's correct.
This is how I connect...
<?php $db = mysql_pconnect("localhost", "username", "password"); mysql_select_db("dbname",$db); ?>
pconnect it better, it opens a persistent link to the host, speeds things up.
Hope it helps.