Form

This is a discussion on "Form" within the PHP Forum section. This forum, and the thread "Form are both part of the Program Your Website category.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 2nd, 2007, 21:51
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Form

If you do an online questionnaire, you answer the questions, tick boxes, drop down list etc and at the end it tells you you score on a new page, how do I do that?

My online example:
http://test.lightex.co.uk/wf.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 3rd, 2007, 01:10
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Form

Install PHP on your system if you are hosting the site or check if your host uses php.
then learn how to use PHP.
For what your doing I recommend:
http://www.tizag.com/phpT/postget.php
this is what takes the users input
then this:
http://www.tizag.com/phpT/if.php
if you combine the two,
you get:
The form sends the variables(question answers in your case) to php,
php then checks the variables, something like this:
PHP: Select all

$answer $_POST['answer']
if (
$answer == "yes") {
echo 
"correct!";
} else {
echo 
"wrong!";

Broken down:
$answer = $_POST['answer']
get the answer from the form and make a variable, the variables value will be that from the form. This is example, the possible values/answers would be yes or no.

if ($answer == "yes") {
The correct answer to the question is yes. If the variable is equal to yes
then:
echo "correct!";
which just means, the page will say correct.

else statement. If the variable isn't yes then say it's wrong:
else {
echo "wrong!";
}

You can't copy and paste this and get it to work.
It requires basic understanding of forms, variables and if/else statements.
If you don't want to learn all this, look around for a custom questionnaire on google, or ask someone, I'd be happy to do it in my spare time (which is a lot).

Hope that helps! (if it does Rep me )
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 3rd, 2007, 10:19
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form

I'll try first, it's the only way to learn, thank you for your offer, can you let me know more, via PM, (cost etc)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
form

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
Hiding / Showing form fields based on previous form input John Alexander Hopper PHP Forum 1 Mar 10th, 2008 11:30
form variable within an iframe component of a form kissfreaque PHP Forum 3 Feb 29th, 2008 13:06
form variable within an iframe component of a form kissfreaque JavaScript Forum 5 Feb 29th, 2008 11:57
[SOLVED] PHP contact form redirect to same form Posie PHP Forum 14 Jan 29th, 2008 20:28
ASP form to check weather a form value is already in the database Andrew1986 Classic ASP 3 Oct 25th, 2007 08:23


All times are GMT. The time now is 20:39.


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