forum

Home / DeveloperSection / Forums / Connection in PHP

Connection in PHP

Amit Singh 2581 18-Oct-2010

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

php php 
Updated on 18-Oct-2010

Can you answer this question?


Answer

0 Answers

Liked By