You are here: connect to mysql « PHP Programming Language « IT news, forums, messages
connect to mysql

Posted by Evan Jou on 10/13/07 21:00

Hi there,

I have a simple question for you experts here that I've installed
Apache, PHP and MySQL on my Windows machine and set up a test
script(test.php) like what is listed in a book. It's like

<?php
@mysql_connect("localhost","root","password")
or die("Could not connect to MySQL server!);
@mysql_select_db("mysql")
or die("Could not select database!);
echo "You're connected to a MySQL database!";
mysql_close();
?>

After I opened the browser and selected the test.php, nothing happened.
I look in the php.ini file and uncomment the line

extension=php_mysql.dll

and change extension_dir = ".\" to extension_dir = "c:\php\ext\"

I also make sure libmysql.dll resides on the Windows system path as
told in the book. Then I restart the computer and open the browser again and
select test.php. Still nothing happens. What did I miss? :(

Thank you in advance for your help.

Evan Jou

 

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

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