hi idk whyy my db is not working, i am using localhost where al worked, then i recreated the db and changed the db.php but is not working,
Please copy/paste the error you are receiving when attempting to connect to database.
EDIT: I have just checked your code and it connects to the database successfully.
Note to use
$link variable in order to connect to DB inside your main scripts. Use
global keyword to access it inside functions.
Also, next time you want to debug PHP errors, please add
php_value display_errors 1 in
.htaccess file. If you don’t have such file created yet in your website root, please create one.