|
Posted by SWMason03 on 12/07/06 04:53
Hi,
As anyone successfuly used mysql in yahoo? I'm having trouble
connecting here's my code:
<html>
<center>
<h1>My website title</h1><br>
<?php
$dbhost = 'localhost';
$dbuser = 'admin';
$dbpass = 'mypassword';
echo '<p>PHP works!</p>';
$db = new mysqli($dbhost,$dbuser,$dbpass,'mysql');
echo 'Gets here!'; //never gets here?
if (mysqli_connect_errno())
{
echo 'Error connecting to DB!';
}else{
echo 'DB connection good';
}
?>
</center>
</html>
Shouldn't I at least get an error message? Yahoo claims it makes a
database called "mysql" for you. I'm not sure what parameters I should
enter or why I'm not getting a good error message.
Thanks,
Steve
Navigation:
[Reply to this message]
|