php page refresh

Discussion in 'PHP' started by knish, Nov 19, 2007.

  1. #1
    Hi,

    Find attached a page image. Initially, when user goes to the link, without this code the page shows not needed display. Whereas what is needed is when I press the button go. So, I included that in the if condition. However, it is not working as needed. How is it possible to see it working and be happy and make others happy here.

    $currentPage = $_SERVER["PHP_SELF"];

    if (!isset($_GET['Submit']))
    {
    $host = $_SERVER['HTTP_HOST'];
    $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
    $pagename = 'search_Disp_03.php?Proj_Name=Any&Sequ_Name=Any&Shot_Name=Any&Artist_Name=Any&Dept_Name=Any&Name_Of_Project=Go';
    # header("location: http://renderunit-19/dailies/search_Disp_03.php?Proj_Name=Any&Sequ_Name=Any&Shot_Name=Any&Artist_Name=Any&Dept_Name=Any&Name_Of_Project=Go");
    header("location: http://$host$uri/$pagename/");
    exit;
    }
     

    Attached Files:

    knish, Nov 19, 2007 IP
  2. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #2
    How it should work. Don't you want a redirect? I have tested your code. It is making a simple redirect. I mean what you expect code to do and its not doing that.
     
    greatlogix, Nov 19, 2007 IP
  3. redlorry919

    redlorry919 Peon

    Messages:
    384
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can't you just submit to the resulting page in the html form? It looks like you're just redirecting on submission without any other processes hence you'd be best just to submit directly to the resulting page.
     
    redlorry919, Nov 20, 2007 IP