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
Can you answer this question?
Answer
0 Answers