SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    salem
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help Newbee with $_GET ?

    Could some kind person give me the code (and explanation of) to send this variable

    $names[$i]["url"]

    to another php page using the URL and $_GET method?

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    PA, USA
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    header ("Location: page.php?url=".$_GET[$i]['url']); 
    Assuming I've read that correctly, should do what you want.
    a header redirect will basically tell the webserver to fetch and
    execute the page.php file and pass in the $_GET variable
    you referenced as 'url'. Is that what you mean, or did you mean
    you have got a variable that contains a URL and you want to
    load and execute the PHP in that url? in which case:
    PHP Code:
    header ("Location: ".$_GET[$i]['url']); 
    could help. Of course, if you want to stay in the current PHP file, but execute the code:

    PHP Code:
    include_once ($_GET[$i]['url']); 
    would be sufficient.

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    header("Location: path/to/page.php?url".$i."=".$names[$i]['url']); exit(); 
    Dont know if this will be what you want but it might get you started.

  4. #4
    SitePoint Addict CandyMann_69's Avatar
    Join Date
    Jun 2003
    Location
    Phoenix, AZ
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    PA, USA
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bah, of course, I mean 'Location' not 'Redirect' :S

  6. #6
    SitePoint Member
    Join Date
    Apr 2004
    Location
    salem
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone!
    That was a big help. I got it to work.


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
  •