Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $host="localhost";
- $user="root";
- $password="";
- $con=mysql_connect($host,$user,$password);
- if(!$con) {
- echo '<h1>Connected to MySQL</h1>';
- //if connected then Select Database.
- $db=mysql_select_db("YOUR_DATABASE_NAME",$con);
- $query=mysql_query("YOUR_MYSQL_QUERY",$db);
- }
- else {
- echo '<h1>MySQL Server is not connected</h1>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement