SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    loading differnet php page

    Hi all, I have the following code:

    <form method=post action=<?php echo $_SERVER['PHP_SELF']; ?>>
    <input type=image name=dosearch src='./images/search/go.gif'><br>
    <span class=blue2>Do<br>Search</span>
    </form>

    if($_POST['dosearch_x']>0 || $_POST['dosearch_y']>0){

    //GET SEARCH THAT HAVE BEEN SELECTED

    $y = 0;
    echo $numberofsearches;
    while ($y < $numberofsearches){
    $y++;
    if ($_POST[$y] != ""){
    $search = $_POST[$y];
    }
    }
    //LOAD DIFFERENT PHP PAGE HERE
    }

    Once the 'do search' button is clicked, I need to be able to do processing in this same php document in order do discover the variable $search. This must be done in the same php page. The problem I have is that, once this processing has been completed, I want to be able to load up a different php page in order to do further processing with $search.

    Any ideas on how I can load up a different php page after the 'do search' procedure has been completed?

    Cheers

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Depends on what further processing you want to do.
    You could use includes to load the required page if the conditions are met from the statements.

    Does that make sense?

    Spike


Bookmarks

Posting Permissions

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