hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Making A Form Span Across Multiple Pages
Reply

Forum Jump

Making A Form Span Across Multiple Pages

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-17-2002, 09:55 PM
JTM JTM is offline
Junior Guru
 
Join Date: Oct 2001
Posts: 193

Making A Form Span Across Multiple Pages


I have a form that I put together in PHP and it is VERY long so I have to break it up into two or three pages. Can somebody tell me how I can make it so it will do this? I added an error checking section that will validate the data in PHP. I would like it to validate the data and if it is OK, it will go to the next page of the form. On the first page of the form, the visitor has to enter a username/password so i don't think the hidden form value option will work.

Any advice would be greatly appreciated.


Regards,

JTM



Sponsored Links
  #2  
Old 09-17-2002, 10:24 PM
Radix Radix is offline
Aspiring Evangelist
 
Join Date: Mar 2002
Posts: 376
Well, Im sure someone could help you better than me but since nobody is posting... To have the information in the following pages, I think you need to use a query string. If you look at the URL in your browser Im sure you will see what im talking about like: .php?s=&action=newreply&threadid=75158. Then all you will have to do is make a script to process all the data and the end. Or maybe you could make some kinda cookie like program. Sorry Im a new PHP coder =0

__________________
"The impossibility of conceiving that this grand and wonderous universe with our conscious selves arose through chance, seems to me the chief argument for existence of God; but whether this argument is of real value I have never been able to decide... The safest conclusion seems to be that the whole subject is beyond the scope of man's intellect." - Charles Darwin

  #3  
Old 09-17-2002, 10:31 PM
Radix Radix is offline
Aspiring Evangelist
 
Join Date: Mar 2002
Posts: 376
btw it shouldnt process secure info, but i dont think pw's will be a problem just not like credit card info or nothing idiotic like that

__________________
"The impossibility of conceiving that this grand and wonderous universe with our conscious selves arose through chance, seems to me the chief argument for existence of God; but whether this argument is of real value I have never been able to decide... The safest conclusion seems to be that the whole subject is beyond the scope of man's intellect." - Charles Darwin

Sponsored Links
  #4  
Old 09-17-2002, 10:32 PM
JTM JTM is offline
Junior Guru
 
Join Date: Oct 2001
Posts: 193
I thought about that but since the visitor would be submitting their username/password it wouldn't be secure, correct? If this is correct, is there some other way to do this?

JTM

  #5  
Old 09-17-2002, 10:34 PM
Radix Radix is offline
Aspiring Evangelist
 
Join Date: Mar 2002
Posts: 376
Yes, there are other ways doing it. I'll have to look though... I cant seem to find the page I used to do all this...

__________________
"The impossibility of conceiving that this grand and wonderous universe with our conscious selves arose through chance, seems to me the chief argument for existence of God; but whether this argument is of real value I have never been able to decide... The safest conclusion seems to be that the whole subject is beyond the scope of man's intellect." - Charles Darwin

  #6  
Old 09-17-2002, 10:58 PM
Tobarja Tobarja is offline
Aspiring Evangelist
 
Join Date: Jun 2001
Location: North Carolina, USA
Posts: 363
This link is your best friend: PHP Manual

IMO, you're best option is using a php sessions.

About security: If you're serious about keeping this username/password a secret, you'll want to load at least that first submit to a https:// form. That is the only, I repeat, only way to even pretend you're you're keeping it private.

What you do with it once you get it, is a better question... I would say look in to the mcrypt and hash functions of PHP. If you store the password in plain text anywhere, it's a candidate for hijacking. It could be captured by a black-hat(or more likely, a script kiddie) and used against you, or your user.

__________________
I am now Tobarja.

  #7  
Old 09-18-2002, 12:29 AM
CChard CChard is offline
WHT Addict
 
Join Date: Mar 2002
Posts: 123
You could pass the info in a URL

At each script have this:

PHP Code:
<form method='POST' action='form2.php?info1=".$info1."&info2=".$info2."'
And so on.

But you could also pass it to sessions and then the users couldn't see the info in the address bar.

__________________
www.atlanticrail.com

  #8  
Old 09-18-2002, 12:31 AM
JTM JTM is offline
Junior Guru
 
Join Date: Oct 2001
Posts: 193
Could you please give me an example of how I could do this with sessions? I'm new to using PHP.


JTM

  #9  
Old 09-18-2002, 06:26 AM
NicoV NicoV is offline
WHT Addict
 
Join Date: Aug 2001
Posts: 145
sessions

If you want to use sessions you could use the session id as a unique field in a database where you store the information temporarily until the last page of the form is processed. You then grab the info from the database and process it all.

IMO, this would be the best solution for you.

Edit: For the password, the best is to use md5. This means no-one can pull passwords from where you store them. Only problem is, you can't retrieve it either if the user has lost his/her password.

__________________
Nico V.
KazaaSkins.Com - Now online!

Reply

Related posts from TheWhir.com
Title Type Date Posted
Microsoft Announces Internet of Things Azure Cloud Service in Limited Beta Web Hosting News 2014-04-16 14:42:11
The Difference Between the NSA and “Everyone Else” Blog 2013-10-22 11:57:14
Internationalized Domain Names for SMBs with DotAsia CEO Web Hosting News 2013-10-18 16:18:45
Jelastic Partners with innofield to Launch Beta Service in Switzerland Web Hosting News 2013-04-09 15:26:47
Lead Generation Part 1 – Form Fills Blog 2012-11-16 09:03:48


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?