![]() |
Data Store in MySQL
How Data Stored in MySQL when i attached MySQL to PHP Websites?
|
first you need to create connection to the database
mysql_connect(servername,username,password); below is an example we store the connection in a variable ($con) for later use in the script. The "die" part will be executed if the connection fails: $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } // some code mysql_close($con); ?> mysql_close above will close the connection automatically when the script ends. |
thanks for given information...
|
All times are GMT -7. The time now is 01:31 PM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.