You are here: Accessing MySql in PHP on Yahoo! Web hosting « PHP SQL « IT news, forums, messages
Accessing MySql in PHP on Yahoo! Web hosting

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация