Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Is there any way to send text in a variable from one page to another other than URL variables or sessions?

    Thanks
    JR

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    You can send it in the page header via a post.

  4. #3
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    How?
    JR

  5. #4
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Forget it, I used a session instead.
    JR

  6. #5
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    How about writing the variable(s) to a file and the subsequent page reads the file?
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.

  7. #6
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    That can be quite resource intensive (and you'd still need a way of associating a set of variables with a certain user--the intention of sessions), but it can be done.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  8. #7
    Senior Member nsr81's Avatar
    Join Date
    Oct 2002
    Posts
    1,132
    Member #
    250
    Liked
    15 times
    That's what essentially sessions do. All the session data is stored in either files or database, in case of files, most likely you'll find the in /tmp directory. They are named sess_[unique identifier]
    There and Back Again :Ogre:

  9. #8
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    What exactly are you trying to do? If you tell us, maybe we can help you a bit more!

    The other thing is why don't you want to use sessions or query strings? That's the whole point of having them.

    For POSTing data, you concatenate the variables like you would into a querystring (v1=a&v2=b etc), with the variables HEX encoded. Then you send it via header. It would be excessively slow I would think, but it would work.

    To figure out what a POST header looks like: download Mozilla or Firebird and install the live HTTP headers extension. Fill out a test form and submit it.

    Hope this helps.
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.

  10. #9
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    It's ok now. The problem was that I didn't want to use a querystring because it could be changed by the user, and I thought I couldn't use a session because it would only be started if a statement was true.

    But I did use a session in the end, I was just wondering if there was any quick (1 line) way of doing it, other than having to go to all the bother of using a session, which there isn't.
    JR

  11. #10
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    Yes query strings can be changed by the user, but so can POST data, and so can cookies (which are used in sessions). Just make sure you validate all data you receieve.

    But perhaps the point is that query strings are the easiest to manipulate by the users because they are very visible...
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com