Zonet
Web Developer
Hi, I dont know if this is the correct board to post on but, here's my first script with php mysql.
Please, tell me some exercises I can work on and the site I can read for better tutorial.
PHP:
<html>
<center>
<?php
$sql['host'] = 'localhost';
$sql['username'] = 'root';
$sql['password'] = 'mypassword';
$sql['database'] = 'mydbname';
$mycon = mysql_connect($sql['host'], $sql['username'], $sql['password']);
if(!$mycon) {
die('Unable to connect to MySQL.'. mysql_error());
}
else {
$dbselect = @mysql_select_db ($sql['database']);
echo 'MySQL Connected. <br />';
}
if(!$dbselect) {
die('Could not select databse. '. mysql_error());
}
else {
echo 'Choosing databse ... Done.';
}
?>
</center>
</html>
Please, tell me some exercises I can work on and the site I can read for better tutorial.