Results 1 to 7 of 7

Thread: shoving variables from one page to another

  1. #1

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609

    shoving variables from one page to another

    how can i shove a string variable from one page to the other withough putting it in the address. sending it invisably without assigning cookies.


    ???

    thanx for any help.

    ME!

  2. #2
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    You could pass it through a HIDDEN field

    <input type='hidden' name='theName' value='<?echo($someVal);?>'>

  3. #3
    scoutt
    Guest
    or if your other pages are in the same .php file

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    hmm, how about writing the value to a file, then reading it in the next php file

    or

    use sessions! which is basically the same thing

  5. #5

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    Originally posted by chrisjk
    hmm, how about writing the value to a file, then reading it in the next php file

    or

    use sessions! which is basically the same thing
    Explain pls ? sounds like the solution I need

  6. #6
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    check out sessions here http://www.php.net/manual/en/ref.session.php

    they use cookies but only to store the session id, not the actual string. If the user has disabled cookies, then it will put the session id in the URL, like http://www.somedomain.com/page.php?p...4723t48yg23jh3 which it will automatically append

    If you don't want to use sessions then as I said just write the string to a flat file in the first script, then read the same file back again in the second script. The user will never know it's happening

    Check out file handling stuff here http://www.php.net/manual/en/ref.filesystem.php

  7. #7

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    thanx chrisjk, i'll look at that as soon as i have the chance

Posting Permissions

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



Click Here to Expand Forum to Full Width