Hi, I'm fairly new to php coding and would like to know how to make a form that process the input data into the $_SESSION headers. Currently, I have a form with the post method and upon loading a page, it checks to see if $_POST is set and if it is, I had it to set $_SESSION to that $_POST value. Anyone can tell me if this is secure or there is a more robust way to do it?
If all you want to do is take $_POST["varname"] and stick it into $_SESSION["varname"] so it's available to the session, that should be fine. If you wanted to store a number of form fields' values & have more flexibilty you could create a class to store the data and serialize that into the session object. But if it's just a couple of values, that's probably overkill cheers Glenn