Jump to content

Help with radio buttons?


ChrisMartino

Recommended Posts

Ok, So as part of my register script, I need to get them to select a account type, This involves selecting it from a radio box, But i need them to be redirected to a page like this

 

If they select "Artist" they are redirected to the page "register.php?account=artist"

If they select "Band" they are redirected to the page "register.php?account=band"

 

And so on, Heres my html radio form:

 

	<div id="main">

		<a name="TemplateInfo"></a>
		<h1>Create new Account</h1>

		<p>
		First off, Select what account type you wish to register:

		<FORM ACTION="register.php">

		<INPUT TYPE=RADIO NAME="Account" VALUE="Artist">Artist<BR>
		<INPUT TYPE=RADIO NAME="Account" VALUE="Band">Band<BR>
		<INPUT TYPE=RADIO NAME="Account" VALUE="Record">Record Company<P>
		<br />
		<INPUT TYPE=SUBMIT VALUE="Next">

		</FORM>



		</p>  


	</div>

 

Link to comment
https://forums.phpfreaks.com/topic/188630-help-with-radio-buttons/
Share on other sites

you resgister.php will be like this

 

  if($_REQUEST['Account'] == 'Artist')
     {
   header("Location: register.php?account=artist");
   exit;
 }
  elseif($_REQUEST['Account'] == 'Band')
     {
 header("Location: register.php?account=band");
   exit;
      }
  else{
	//for third option record

  }  

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.