You should use PDO
if you can help it, mysql_*
functions are officially deprecated. Learn about prepared statements instead, and use PDO or MySQLi. Check out this comparison and if you choose PDO, here is a good tutorial.
In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:
This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d