Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

establish a connection with MySQL in php

Sun Oct 26, 2008 7:01 pm

establish a connections to mysql database from php script
Code:
 <?php
  $host
="host";
  
$uname="codemiles";
  
$pass="password";
  
  
$connectionmysql_connect ($host$uname$pass);
  if (! 
$connection) {
    die (
"A connection to the Server could not be established!");
  } else {
    echo 
"User root logged into to MySQL server ",$host," successfully.";
  }
  
?>





Post a reply
  Related Posts  to : establish a connection with MySQL in php
 Connection object in jsp     -  
 How to use connection object in jsp     -  
 Closing connection in jsp     -  
 database connection     -  
 Encrypt connection string     -  
 Mobile to PC connection using Bluetooth     -  
 Bluetooth connection using C# (won't work)     -  
 Using java in http connection     -  
 Connection Reset By Peer     -  
 How to open http connection using j2me     -  

Topic Tags

PHP Database