SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: $http_get_vars

  1. #1
    SitePoint Enthusiast dvdrip's Avatar
    Join Date
    Oct 2001
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $http_get_vars

    I am using this line of code to check if newlogin has been set:
    if (isset($HTTP_GET_VARS['newlogin']))...

    What happens when I reload the page and I want newlogin NOT to be set?
    How do I do that?
    It keeps going into the if...
    Web Development:http://www.bluepixel.gr/
    Coming Soon:www.dvdrip.com

  2. #2
    SitePoint Enthusiast dvdrip's Avatar
    Join Date
    Oct 2001
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I did was: 1:I wrote this script:
    <?php
    if (isset($newlogin)):
    ?>
    <form action="<?=$PHP_SELF?>" method="post">
    <p>Type your Login herebr />
    <input type="text" name="login1">
    <input type="submit" name="submitlogin" value="SUBMIT" /></p>
    </form>
    <?php
    else:

    2:I made register_globals off and replaced $newlogin
    with $HTTP_GET_VARS['newlogin'] and added
    unset($HTTP_GET_VARS['newlogin']);
    after the if statement.

    The thing is that when the page is reloaded the URL is $PHP_SELF that is equal to http://localhost/test.php?newlogin=1. How do I get rid or the newlogin=1???
    Please!
    Web Development:http://www.bluepixel.gr/
    Coming Soon:www.dvdrip.com


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
  •