conor
New Member
I have a database connection that was previously working and now isn't. How can i echo the MySQL error so that it tells me whats wrong? As far as i know the error message should be displayed because of line 5?
Heres a link to the page: http://www.todhchai.org/contactus.php#mailing_list
Here is the db.php file:
(I have taken out the correct connection details)
1.<?php
2.
3.$link = mysql_connect('localhost', 'wherever', 'wouldn't-you-like-to-know!');
4.if (!$link) {
5. die('Could not connect: ' . mysql_error());
6.}
7.mysql_select_db('list');
8.?>
Is it possible that i might have somehow overwritten line 5 in with the "user friendly" error message that i have set up in the contactus.php file? If you need access to the contactus.php file just ask.
Heres a link to the page: http://www.todhchai.org/contactus.php#mailing_list
Here is the db.php file:
(I have taken out the correct connection details)
1.<?php
2.
3.$link = mysql_connect('localhost', 'wherever', 'wouldn't-you-like-to-know!');
4.if (!$link) {
5. die('Could not connect: ' . mysql_error());
6.}
7.mysql_select_db('list');
8.?>
Is it possible that i might have somehow overwritten line 5 in with the "user friendly" error message that i have set up in the contactus.php file? If you need access to the contactus.php file just ask.