Results 1 to 3 of 3

Thread: Carrying Variables

  1. #1
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default Carrying Variables

    On my login page (http://mburt.mb.funpic.org/login_page.php > login with username "user" and password "test") I want to carry the variable: ?user=user from page to page. I can get it to carry over to the index.php, which in the address bar will appear index.php?user=(username here), but then when you go to another page, it's gone. How can I carry this variable over from page to page?
    - Mike

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Use a session.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Doing it manually is also possible, but this would require manually adding it to each link (via php, but typing that in for each a tag), and adding a hidden value to all forms, as well as working out a solution for any other links/etc.
    So.... use sessions.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •