Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Simple PHP session question

Options
  • 01-09-2014 12:18pm
    #1
    Registered Users Posts: 4,946 ✭✭✭


    Hi!

    Im just wondering if I could get some input to using session on a website. There is a booking form on the site which has a 5 page journey and I dont want to keep passing variables with $_GET / $_POST as it is getting messy.

    Would it be a bad idea to just use session for some of this data? The data itself is in no way sensitive. I would usually just fire ahead and use session, but I feel like I'm missing something on this..

    thanks


Comments

  • Registered Users Posts: 159 ✭✭magooly


    PHP & sessions is what you are looking for.

    notes that come to mind:

    if you are authenticating users ie a login, you need to ensure your webserver login is over SSL
    All pages need to be served from the same host to preserve the session cookie.
    You need session::start at the start of every page in the conversartion.
    If you are storing any user submitted data in the session and eventually persisiting it into a DB you must pass it through the usual XSS(Cross Site Scripting) & SQL injection filters.


  • Registered Users Posts: 4,946 ✭✭✭red_ice


    thats great, thanks!

    I should point out that the reason that I'm asking this is that Im more concerned about server performance than how to do a session!


Advertisement