Reply to mysql_connect()

Your name:

Reply:


Posted by Andrew Clark on 06/08/05 17:57

Hello,

I am having trouble connecting to my server with mysql_connect(). I can
connect via the command line on the server and with phpMyAdmin over our
network, but not though mysql_connect(). This is my script:

<?php
$host = '192.168.100.5';
$user = 'root';
$pass = <password>;

echo '<P>Connecting...</P>';
//echo 'mysql_connect('.$host.', '.$user.', '.$pass.');';
//$link = false;
$link = mysql_connect($host, $user, $pass) or die(mysql_error());

if ($link)
{
echo '<P>Connection OK!</P>';
mysql_close($link);
}
else
{
echo '<P>Connection failed.</P>';
}
?>


The last thing I see on the page when I load this is "Connecting..." -
nothing else. It's been a while since I have worked with PHP/MySQL so
please bear with me!

Thanks,
Andrew

[Back to original 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

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