SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI,

    I was just thinking about queries a few mintues ago and how I used them.

    I would like advice on what is the proper way to use them.
    What should I place in the URL?

    Also, when submitting a form, how do I get teh session to pass over onto the next page?

    Thanks for the replies.
    peter

  2. #2
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personally I dislike passing session queries in a URL - not only is it very ugly but it's also quite insecure, as many people copy and paste links from their browser into IRC or instant messengers such as ICQ. Anyone else clicking on that link will take over the first persons session.

    I always save session IDs in a cookie - I'd like to offer n option of passing them in the URL if necessary (i.e ifa user does not have cookies enabled) but so far I haven't got round to writing the necessary code...

  3. #3
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do yuo pass them in a cookie, do you just leave everything out and it is automatic?

    How would you pass it in a URL from a form?

  4. #4
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you wouldn't pass it in a url from a form but as a hidden value so

    <input type=\"hidden\" name=\"s\" value=\"$sessionhash\">

    for example.

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not just compile php with --enable-trans-sid

    This says that if a user has cookies turned on then store the session id in a cookie(which it does by default) and if they don't have cookies automatically append the session id to every url on the page. Very handy indeed.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got that, but I was thinking, that for a script I want to make with sessions what the easiest way to do it would be.

    -Peter

  7. #7
    SitePoint Columnist Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <edit> oops, didn't hit refresh on my browser and thought this post hadn't got replies yet </edit>
    Last edited by Skunk; Apr 19, 2001 at 03:47.


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
  •