Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,673
    Thanks
    28
    Thanked 4 Times in 4 Posts

    when re-directing do I loose my variables ?

    Hi,

    I have an error message in one script and its not getting through to
    the display script. Is this because it goes through a redirect ?

    EG

    PHP Code:
    if ($num == ) {
      
    $err_mes "There an ERROR in locatiing this product.";
        if (@
    $_SESSION['guru'] == "Geldi"){
                    require_once (
    "exp_control.php");
         }  
    // endif 
    Then in "exp_control.php" I have:

    PHP Code:
    if (@$_SESSION['guru'] != "Geldi"){
         
    header("Location: /im/mem_start1.php");
         exit();
    }  
    // end if 
    In "mem_start1.php" I have:

    PHP Code:
    if( isset($err_mes)){
      if(
    $err_mes != ""){ 
         echo 
    "<div style='position:absolute; top:250px; left:700px; color : red;' >
             Error<b><blink>:</blink></b> $err_mes</div>"
    ;
             } 
    // end if 
     
    // end if 

    But I don't get the error message.

    Is the redirect dropping the variable ?

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Put simply, yes. Use the $_SESSION array or a query string on the URL to pass things along.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •