TECLAHOST - FORUM ABOUT HOSTING, HOUSING, VIRTUAL SERVER, DEDICATED SERVER, E-MAIL
How to test a PHP to MYSQL Connection  
Home Help Search Login Register
 

Username  
Password
Pages: [1]   Go Down
  Print  
Author Topic: How to test a PHP to MYSQL Connection  (Read 542 times)
kilop
Membro Sénior
****
Offline Offline

Posts: 114


View Profile
« on: January 11, 2010, 08:17:48 pm »

<?php $link = mysql_connect('localhost','root','password'); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'Connection OK'; mysql_close($link); ?>
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  




MySQL |  PHP |  Valid XHTML |  Valid CSS