RE: Help with IF ELSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I turned on error reporting (ALL) as you suggested. Nothing is being
sent to the browser....still doesn't work if the recordset isn't empty.

I'm wondering, is there any other way to do a redirect in PHP?

Thanks


-----Original Message-----
From: richard.heyes@xxxxxxxxx [mailto:richard.heyes@xxxxxxxxx] On Behalf
Of Richard Heyes
Sent: Thursday, December 04, 2008 3:17 PM
To: David Stoltz
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Help with IF ELSE

> I'm new to PHP - I'm trying to figure out what is wrong with a simple
IF
> ELSE block I have...if the recordset $rs is empty (login fails), the
1st
> part of the block works, and redirects the user to default.php - but
if
> the login works, and $rs is not empty, the 2nd "else" part does not
> work, and does not redirect to menu.php - I just get  a blank white
> screen on the login.php page (where this code is)....

You could try setting error_reporting() to full before you do
anything, it may help, and it's always prudent to use it that way:

<?php
    error_reporting(E_ALL);
?>

Additionally, redirects fail when you've sent output to the browser,
even if its just whitespace. Your code looks OK, but check for it. The
error reporting thang may help you with that.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 29th)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux