Sponsored By
MindStick SurveyManager
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
   

Home >> Other Programming >> PHP >> Connection in PHP
Author Post

Amit Singh


Total Post: 104
Member Since: 8/8/2010
Points: 702
Connection in PHP
Posted On: 10/18/2010 10:22:41 AM
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
Modified On: 11/3/2010 1:48:40 AM
Report Abuse Form
Reason:    
 
Total Online Users: 2996
Advertisement
MindStick DataConverter
Advertise with Us
  
Copyright © 2009 - 2013MindStick. All Rights Reserved.