SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast pea's Avatar
    Join Date
    Jul 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using many scripts

    I was wondering if anyone could tell me how to get variables from other scripts.

    Thanks. Pete

  2. #2
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please elaborate....

  3. #3
    SitePoint Enthusiast pea's Avatar
    Join Date
    Jul 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    O erm.. i want to open a submitted link in a different page

  4. #4
    SitePoint Enthusiast elecktricity's Avatar
    Join Date
    Oct 2005
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    like from one page to another?
    you use a forum
    Code:
    <html>
    <head>
    <title>Page1.html</title>
    </head>
    <body>
    <form action="Page2.php" method="get">
    <input type="text" name="input" value="">
    <input type="submit" value="Send!">
    </form>
    </body>
    </html>
    PHP Code:
    <?PHP
    //Page2.php
    echo $_GET['input'];
    ?>

  5. #5
    SitePoint Enthusiast pea's Avatar
    Join Date
    Jul 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No i mean from one php script to another php script

  6. #6
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    include the script?

  7. #7
    SitePoint Enthusiast pea's Avatar
    Join Date
    Jul 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, the point of the script is to open the link in a different page. So google can't index them. So the url is sent to the script which Header("Location: "$url"); thing.

  8. #8
    SitePoint Evangelist Waffles's Avatar
    Join Date
    Nov 2005
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    echo '<a href="mypage.php?link=www.google.com">click<.a>';

    // mypage.php
    $url $_GET['link'];
    header("Location: $url"); 

  9. #9
    SitePoint Enthusiast pea's Avatar
    Join Date
    Jul 2006
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks works perfectly


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
  •