Passing a value through forms then using it?

This is a discussion on "Passing a value through forms then using it?" within the PHP Forum section. This forum, and the thread "Passing a value through forms then using it? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 7th, 2007, 13:23
New Member
Join Date: Feb 2007
Location: in a house
Age: 22
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Passing a value through forms then using it?

Hi (my first post, i dont know if this post should go in here or html forum i think either? )

Now onto my question...

I have 4 html pages with 4 forms, i want to allow the user to input their name ($name) on form 1, then set up a hidden field with the value, $name - section 1 etc ... so when the information is emailed each time the user selects next the value $name will stop with each form, without the user inputing their name every time.

Or instead of having 4 html pages is there a way to use one html page and and only show one section at a time? I.E; user fills in section 1, presses next then in the same html file the user sees section 2? Saving the data from section 1 for it all to be emailed at the same time at the end when the user presses submit. This is the ideal way to do it i suppose but i dont know how to. Is there any online tutorials or help anywhere?

Thanks
Reply With Quote

  #2 (permalink)  
Old Feb 9th, 2007, 16:51
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Passing a value through forms then using it?

The magic you're looking for is "sessions" and the $_SESSION super-global array. You'll probably not want to use hidden fields unless you're looking for a high security setuop where people aren't sllowed to move away from the site in the middle of their application and come back. And sessions do all the hard work for you too !
Reply With Quote
Reply

Tags
forms, php

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
passing an ID field through to PHP Colm Osiris PHP Forum 2 Nov 20th, 2006 08:24
Variable passing VanderBOOM JavaScript Forum 20 Nov 2nd, 2006 21:39
Passing a Variable to ASP Smog36 Flash & Multimedia Forum 1 Sep 13th, 2006 14:05
Passing Data ... TheShadow Classic ASP 2 May 30th, 2005 09:31
PLEASE HELP - Passing Variables in Querystring just_the_basix Classic ASP 40 Sep 3rd, 2004 10:46


All times are GMT. The time now is 18:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43