CONNECTION IN PHP

Amit Singh

Total Post:103

Points:721
Posted by  Amit Singh
PHP 
PHP
 1691  View(s)
Ratings:
Rate this:
Connection in PHP we use this code:

<?php
//Start PHP statement
$link 
mysql_connect('localhost''mysql_user''mysql_password'); //this is the MySql connection function with passing parameter

if (!
$link) {
 die(
'Could not connect: ' mysql_error()); //this is show the connection error
}
echo 
'Connected successfully'; //It show the message connection successfully or not
mysql_close($link); //connection close here
?> //End PHP statement

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!