<?php $username = "root"; $password = ""; $hostname = "localhost";
mysql_connect($hostname, $username, $password) //Conecting to MySQL or die("Unable to connect to MySQL"); //if not conected echo "Connected to MySQL!!!<br>"; //if conected
mysql_select_db (LearningPHP) //Selecting Database(mysql) or die("Unable to connect to MySQL/First database");//if not conected echo "Connected to MySQL/First!!!<br>"; //if conected
$query = mysql_query("SELECT FROM LearningPHP"); $row = mysql_fetch_array($query); echo $row['First'];
mysql_close(); //Disconecet from MySQL ?>
|