Help needed with creating a radio button form

This is a discussion on "Help needed with creating a radio button form" within the PHP Forum section. This forum, and the thread "Help needed with creating a radio button 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 Nov 12th, 2006, 01:06
Up'n'Coming Member
Join Date: Jan 2006
Location: Belfast
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Help needed with creating a radio button form

Hi all,

I am using dreamweaver MX and need to (quite urgently!!) create a form with a mixture of text boxes and radio boxes.
Text boxes for simple questions, and then for the radio buttons - there will be a question, and they click the relevant radio button out of four.
I can create a basic form on dreamweaver, but have no idea how to do it so the form submits and emails me the results?
Can anyone point me in the direction of a good (free!) tutorial to learn as I am guessing it will be too much to put in a post!
Many thanks
Ben
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 Nov 13th, 2006, 06:52
Junior Member
Join Date: Oct 2006
Location: Uxbridge, West London
Age: 26
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help needed with creating a radio button form

Do you need to store the results somewhere or simply email them to yourself?

If you simply need to email them to yourself then have a look at the mail function in PHP

As for processing the results in the first place, the first think you will need to do is check to see if the form has been submitted so you would have something like this:

PHP: Select all

if ($_POST[Submit])
{
   
//Code for processing the data goes here.

So for example if you have a form with a textbox to enter your name the code should look something like this.

HTML: Select all
<form name="form1" method="post" action="$_SERVER['PHP_SELF']">

<input name="name" type="text" id="name" size="100">
<input type="submit" name="Submit" value="Submit">

</form>
Then to process the code you would have something like this.

PHP: Select all

if ($_POST[Submit])
{
   
$name $_POST[name]; //This stores the value from Name into a variable which can then be passed through to your mail function.

This should give you an outline of how to do it without giving you the whole answer

Hope this helps.
Gustava32
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, help, 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
[SOLVED] large radio button form submit chriscant JavaScript Forum 7 Oct 25th, 2007 09:03
redirecting form based on radio button values c_martini JavaScript Forum 7 Oct 9th, 2007 10:26
radio button interfering with drop down antonyx JavaScript Forum 1 Apr 27th, 2007 00:11
Any way to use an image for a radio button? masonbarge Web Page Design 23 Jan 6th, 2007 10:06
problem with radio button in form validation augustus_emperor JavaScript Forum 1 Apr 22nd, 2004 13:08


All times are GMT. The time now is 14:16.


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