Re: PHP and MySQL question...
| From: | Fraser MacKenzie | Date: | Sun, 09 Apr 2000 02:17:39 +0000 |
| Subject: | Re: PHP and MySQL question... | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-17754@lists.php.net to get a copy of this message | ||
That worked Evan! Thanks ever so much!
--
Fraser MacKenzie (fraserm@rondaksportal.com)
---------------- (ICQ: 15389075 RPGA: 805219)
Rondak's Portal (http://www.rondaksportal.com/)
What do you want to play today?
On Sat, 8 Apr 2000, Evan Klinger wrote:
> Fraser MacKenzie wrote:
> >
> > Folks, I am using PHP and mysql for a site, and when I do a mysql_connect
> > (for most pages) if it succeeds I want to continue onwards. If it fails
> > then I want to locate to a 'Site Maintenance in Progress page'. However,
> > the problem seems to be that as soon as the connect fails the following
> > error message is pumped out to stdout:
> >
> > 'Warning: MySQL Connection Failed: Access denied for
> > user: 'yyyyy@xxxxxx.com' (Using password: YES) in /pub/inc/db.inc on line
> > 49
> >
> > Now, as soon as this is sent to stdout, I can no longer use:
> >
> > Header ("Location: http://www.xxxxxx.com/maintenance.html");
> >
> > Is there any way to disable the outputing of the warning message from
> > mysql? Is this something I should be sending to the mysql mailing list?
> >
> > Thanks in advance for your time and trouble....
>
> Proceed the mysql_connect() call with an '@'. This will disable the
> output of the mysql_connect() function so you can then use the header()
> function to redirect. Hope this helps.
>