I'm working on developing a website through Dreamweaver with html, php, and mySQL, and I wanna connect it to the localhost, so I installed easyPHP and added an alias in the local files with the name saadstore and the directory of the folder However, when I run my code it displays an error when the database name is selected! Instead if I run a page that doesn't interact with links and other pages in my site (doesn't need connection) it works just fine! Here's the code:
<?php
$db_host="localhost";
$db_username="root";
$db_pass="";
$db_name="saadstore";
mysql_connect("$db_host","$db_username","$db_pass")or die("Could not connect to mySQL");
mysql_select_db("$db_name")or die("no database");
?>
when I save and open the file from the localhost I get "no database" I'm kinda new to this so .. any help?