[PHP] Header(Location: ... or Header(Refresh: 0;...

2006-05-16 Thread Kevin Davies
Hi All,

I'd really appreciate your advice with this one... 

I have a cart. Visitors can browse a catalogue, click 'Add to cart', and are
taken to the shopping cart with the new item added...

This is working perfectly for 99.9% of visitors, although 2 separate support
calls have reported they don't get redirected (catalogue page remains in
address bar), and the page doesn't load (blank white page with 'Done' in the
status bar).

Now I'm guessing this has something to do with the header command I'm using:

header (Refresh: 0; URL=cart.php?action=addid=$referencec=$catp=$page);
exit;

I'm guessing the header isn't working, but the exit does, hence no page
load.

I've searched the web and some contributors say Refresh shouldn't be used,
and others say that a 0 Refresh is exactly the same is the same as a
'Location' header command. But is even related to my problem?

The user concerned has the same browser version and privacy settings as me.
I can get them to re-test, but would like to be fairly confident as to the
problem before I do... :)

What are your thoughts? Thanks in advance for your help.

Best regards,

Kevin

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



Re: [PHP] Header(Location: ... or Header(Refresh: 0;...

2006-05-16 Thread Richard Lynch
On Tue, May 16, 2006 10:48 am, Kevin Davies wrote:
 header (Refresh: 0;
 URL=cart.php?action=addid=$referencec=$catp=$page);
 exit;

I don't think this is a real header -- just some made-up crapola
from MS that works on most browsers, from the bully-pulpit
principle.

You'd have to read the HTTP specs for yourself to work it out...

That said, if it's not working, then it's not working.

Location: *DOES* work.

-- 
Like Music?
http://l-i-e.com/artists.htm

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