I'm really stuck with this. I've never done anything like this before and now for uni we have to do 2 projects using MySQL and php. I've installed apache, php and MySQL on my computer and the apache and php seem to work but I've no idea how to use the SQL
I copied a php script from a book that is just supposed to connect to the sql and show a message saying that its connected but it just shows a blank page which I take it to mean that its not connecting properly.
Code:
<?php $user = "username";
$conn = mysql_connect( "localhost", $user, "password" );
if($conn){
$msg="Congratulations $user, you connected to MySQL"; }
?>
<html><head><title>Connecting user</title></head>
<body><h3> <?php echo($msg); ?> </h3></body></html>
Also what is the $user supposed to be? Does it have to have a specific value? Any help would be grately apprieciated (in language for someone whos crap with computers to understand
), I've been trying to get it to work all day