So I've created a php file and I'm trying to connect to my database:
<html>
<head>
</head>
<body>
<?php
$con = mysql_connect ("localhost","Densino","password");
if (!$con){
die("cannot connect: " . mysql_error());
}
echo 'connected successfully';
mysql_close($con);
?>
</body>
</html>
But when I go to the localhost there is no data to be seen. The php file is saved in the www folder of wamp too,.So i'm at a total lose.
I've even followed a tutorial on youtube, where that code is from and it works perfect for him.
Any help is appreciated. This is what I see when I run localhost and click into the folder INDEX
I created a new folder for my projects in WWW.. and I ran the folder in the browser: http://Localhost/projects
This created a new index file in the folder which allowed me to view my php scripts
Thanks for the help and guidance guys