Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 06-11-2012, 02:40 AM
Junior Member
 
Join Date: 06-09-11
Posts: 2
iTrader: 0 / 0%
[PHP] Session or hidden fields?

Hey guys,
I suppose i have a rather simple question, but i am not able to answer it myself, yet. This is the scenario:

You collect user input within a form. The page/script the form is directed at (the form's action) should not process the input, but store it for the next script to process. So there is one script and html page between collecting and processing the data. What is the better way to störe the input. Should i write it to the Session or store it in hidden input fields on the html page in between or is there a better way i did not even see yet?

Thanks for your replies!
Tim
 
Reply With Quote
  #2 (permalink)  
Old 06-11-2012, 05:07 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,116
iTrader: 4 / 100%
Session may be a tad more secure but in the example you describe, for most purposes I very little difference between the two.

Hidden fields can be viewed on the source code of the page containing the input (may not be true if it is all in php). Session data can not be viewed.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
2013 resolution: Don't feed trolls
ScriptMan
 
Reply With Quote
  #3 (permalink)  
Old 06-14-2012, 12:31 AM
JohnnyS's Avatar
Contributing Member
 
Join Date: 07-05-11
Location: philippines
Posts: 312
iTrader: 0 / 0%
sessions would do, save the data every time the form is submitted then use the data when the final process will be done..

if you're into HTML5, you can use Local Storage feature of HTML5 to save data and on the final form retrieve the said data..
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Experts Of Various Fields mclenhard Looking To Hire 2 09-28-2011 05:13 PM
Where is session stored? can i extend the period a session last? 2939195631902 Coding Forum 1 02-08-2009 08:12 AM
form fields on the fly code_junkie Coding Forum 1 08-07-2008 03:04 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:06 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.