Hi,
How would I, instead of submitting something to the $_POST array, make it go into the $_SESSION array?
Hi,
How would I, instead of submitting something to the $_POST array, make it go into the $_SESSION array?
Yeah, also what should I use if I want to include stuff in my PHP files? .inc or what?
You wouldn't. POST it to a page, and then from there put it into a session.How would I, instead of submitting something to the $_POST array, make it go into the $_SESSION array?The file extension doesn't matter. It's common to use something like .php or .inc.php (or to cause PHP to parse .inc files) to avoid people viewing the source of the include, which may contain sensitive information. However, it's really not important.Yeah, also what should I use if I want to include stuff in my PHP files? .inc or what?
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!
Ok, how would I put a variable into the session?
By the way, thank you sooooo much!
Read http://www.php.net/session for more information on handling sessions.
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!
$_SESSION['varname'] = $_POST['varname'];
Or, if you really wanted....
$_SESSION = $_POST;
But I think that would screw things up, including confusing the session id.
I think there's a merge Array function available. Check php.net for it.
And check the link Twey gave... should help.
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
Thank you so much everybody for your time and help!!!!!!!!!!!!![]()
![]()
Bookmarks