Re: Error in MySQL

From: Date: Thu, 10 Aug 2000 07:34:28 +0000
Subject: Re: Error in MySQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-11078@lists.php.net to get a copy of this message
<?
        if (!$id) {
                header("Location: invalidquery.html");
        }
        ...
        your current script here :-)
        ...
?> At 02:41 10-8-2000 -0400, Jay wrote:
Hi, Where can I find the information on how to do what you mentioned? Thanks, Jay Stauffer "David Robley" <huntsman@www.nisu.flinders.edu.au> wrote in message news:200008100638.QAA18388@odo.cc.flinders.edu.au... On 10 Aug, Jay wrote:
Hello, I am using PHP to call data from a database by html.php3?id=#. It works great, but if the user would go to html.php3 it pops out this error: Warning: 0 is not a MySQL result index in (absolute path)/index.php3 on
line
17 I was wondering if there was a way to redirect to user to another page,
so
that they do not see the error? Thanks, Jay Stauffer
You could test in html.php3 if $id is set - if not then you could do a redirect instead of running the database query. Cheers --
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#11078) next »