#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    33
    Rep Power
    15
    after much problems with cookies,
    i get into another problem in which i
    really need some help ! please !

    i refer a variable this way :
    $mypage = $SCRIPT_NAME;
    A href='view_item.php3?page=".urlencode($mypage);

    then in view_item.php3 i can make a href to
    that page, no problem...
    but....
    when i do a submit on that form with action=$PHP_SELF $page has lost its value.

    what am i doing wrong ???

    i really need help ! (

    thanks !
    Jan.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    33
    Rep Power
    15
    more specific detail :

    when i post a form with PHP_SELF,
    i lose all the HTTP_GET_VARS.

    how can i keep the HTTP_GET_VARS
    without using a cookie ???

    i hope now it's easier to help me :-)

    Jan.
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    You have to specifically pass any variables you want to keep. That doesn't happen automagically even if POSTing to the same page.

    You can do this with a form like this:

    while (list($key,$value)=each($HTTP_GET_VARS))
    {
    print "<input type=hidden name='$key' value='$value'>";
    }

    If you don't want to pass ALL the GET variables you'll have to specifically declare each one in a hidden input field.

Similar Threads

  1. Replies: 11
    Last Post: February 21st, 2004, 06:48 AM
  2. Replies: 0
    Last Post: February 8th, 2004, 10:11 PM
  3. Replies: 2
    Last Post: February 4th, 2004, 11:10 PM
  4. Replies: 2
    Last Post: January 28th, 2004, 10:54 AM
  5. need help with testing non-alphanumeric input
    By pinkipodmini in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 01:48 PM

IMN logo majestic logo threadwatch logo seochat tools logo