PDA

View Full Version : The same form in different pages



Julia
07-07-2006, 05:36 PM
Hi everybody there: trying to set up the same basic form in diffrent pages for my website, but i "guess" i need to change the names of pages, my question is

If i have a form let's say with 3 pages that are already working OK in my site

1. contact
2. error
3. thank_you

Do i have to create a new form and again new 3 pages to set up the same form to get it work and just remane the pages in the .PHP file to


1. contact1
2. error1
3. thank_ you1

etc, etc, is this the right way to do when using the same form in multiple pages on your site?

I hope a colonel inlight me with this tophic..i am at a loss
but all suggestions are welcome...

something that i was wondering is if is possible to use the same error, tank you pages of your form, to redirect all your contact forms to them but once again the experts will have the last word.

Thanks in advance

Andy128
07-07-2006, 08:56 PM
Julia-
The form pages themselves will be differnt names- formpg1, formpg2 etc...

So long as the forms for each page are identical- (i.e.- the number of fields and the field names are the same) then the php processing page can be the same. For each form the action would be something like-
thankyou.php

And you can access the same error page for any form. Lets say that you have 4 forms that have an e-mail field. You can reference the same e-mail error page for all 4.

If you read this tutorial- you can eaisly create one BV page that will display all your error messages- as many as you like.
php mailto security tutorial (http://www.netisopen.com/computer/TF001/phpmailto.html)

This also incorporates form security.

Hope that helps.

Andy

Julia
07-07-2006, 09:59 PM
The form pages themselves will be differnt names- formpg1, formpg2 etc...

Tkank you andy, i thought that the form pages themselves where referred in the .php file by name, and if making a new form for other website page with different names requires a second .php file to be uploaded, are you saying that all forms in my site can work wih one .php file?

I do not know if i get it right?

Andy128
07-07-2006, 10:20 PM
Well- actually the php file is refered to in the form- action= "thankyou.php"

The php script named thankyou.php will then execute when called upon (by action of the form). Therefore- yes. If the forms are identical, the same php script (page) can execute for different forms on a server (website). If you look on the php script, you will not find a reference to the form page.

In actuallity- that concept is how a hacker can use ones form against you. Lets say you set field length limits on your form. Because the form is html, it is visable to all via the source code. A hacker could duplicate your form-removing the field length limit and then set the action to:
http://www.yourdomain.com/thankyou.php and then send out alot of
spam which would appear to come from your form. **That is why the need to have a php script that sets length limits as php is not visable to anyone. So you see- the form can be different- but the php will execute if the fields are identical.

Hope that helps.

Andy

Julia
07-08-2006, 08:42 AM
Thanks Andy i will give it a try. and see what happen

Julia.

brsn
12-18-2007, 02:34 AM
I can not download form part 1 tutorial multimedia last 2 days, something wrong. My problem is reset and submit buttons are not functionate.

Andy128
12-18-2007, 06:19 AM
brsn-
Please post your url to your form so we can check it.

Andy