I have been trying to delete an email address from a database and I get this error. I have checked the password and its ok.
Error Message: SQLSTATE  Access denied for user 'ecovibdc_tudsy66'@'localhost' to database 'ecovib2d_Subscribers' Back to my blog - Try again !
3-Sep-2017 06:52:14 UTC] PHP Notice: Undefined variable: conn in /home/ecovibdc/public_html/ECOVIB2D/unsubscribe/unsubscribe.php on line 69
[13-Sep-2017 06:52:14 UTC] PHP Warning: mysql_close() expects parameter 1 to be resource, null given in /home/ecovibdc/public_html/ECOVIB2D/unsubscribe/unsubscribe.php on line 69
unsubscribe__2_.php ( 2.07k ) Number of downloads: 25
Unsubscribe.php ( 1.55k ) Number of downloads: 24
Sorrytoseeyougo.html ( 1.02k ) Number of downloads: 25
You create a database connection using PDO but then you try to use 'mysql*' methods. PDO has it's own methods, use them instead.
You didn't post the correct page for the 1st error message so I can't look into that.
That is a database connection error message. Make sure your host, user name and password are correct.
Instead of creating your database connection in a function I would recommend you create a class and use it. This is a nice tutorial of doing that, http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/. You still have a lot of research to do concerning PHP.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)