Re: [PHP] $_SESSION variable gets lost on FORM action



Stut wrote:

Redirecting using a Location header is not the only thing you can do with the header() function. It will never end processing of the script no matter what you pass to it. The example on the manual page for the header() function says as much (http://php.net/header), you read that right?

<?php
header("Location: http://www.example.com/";); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

-Stut


Well, I feel like a du***ss!

No, I hadn't read that. I promisse, and this one is to keep, I won't post to this list again without dedicate enough time to the problem, at least to read the manual.

Anyway, thank you for confirm what I should have known in advance and also for remembering me that PHP developers have a PHP manual for PHP users...

Thanks
.



Relevant Pages

  • Re: Ever seen a mail failure like this?
    ... The mail code is straight out ... website to an email address of that same website. ... If you use this MIME message class and set the Return-Path header and ... Find and post PHP jobs ...
    (comp.lang.php)
  • Re: =?ISO-8859-1?Q?Pharis=E4er_auf_zwei_R=E4dern?=
    ... Der Header wird ja vom Script geschickt. ... Das selbe Problem hat man mit *jeder* Sprache, egal ob PHP, ... Shellscripte, JSP etc. ...
    (de.rec.fahrrad)
  • Re: CURL ignores $_SESSION???
    ... it's just that PHP won't stop executing a ... script just because you set a header unless you say so. ... PHP doesn't send the headers to the client until you either ...
    (comp.lang.php)
  • Re: Show image img src=img.php?img=1.jpg help
    ... When i do that the image type is detected correctly as jpeg, ... But earlier you said this really is a bmp, ... I haven't actually tried mixing session_startwith header(); ...
    (comp.lang.php)
  • auto_prepend_file not working with apache 2.2, windows xp and ph
    ... In order for PHP ... different values for several directives, ... The environment variables are not hashed into the $_ENV. ... (e.g. by adding its signature to the Web server header). ...
    (alt.php)