two options in one page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shab620
Forum Commoner
Posts: 48
Joined: Tue Jan 18, 2005 7:50 pm

two options in one page

Post by shab620 »

Hye

I'm currently desiging an online ordering system for a restaurant.

My question is in regards to the post function.

I want to use two radio group to post and want to know if one button can send it two post actions

the sample code is as follows

Code: Select all

</head>

<body>
<form name="form1" method="post" action="first post action">
  <p>
    <label>
    <input type="radio" name="RadioGroup1" value="radio">
    Radio</label>
    <br>
    <label>
    <input type="radio" name="RadioGroup1" value="radio">
    Radio</label>
    <br>
    <label>
    <input type="radio" name="RadioGroup1" value="radio">
    Radio</label>
    <br>
    <label>
    <input type="radio" name="RadioGroup1" value="radio">
    Radio</label> 
    <br>
    <input type="submit" name="Submit" value="Submit">           
    <label>    </label>
  </p>
  <p>
    <label>  </label>  
  </p>
</form>
<p>&nbsp;</p>
<form name="form2" method="post" action="secondpost">
<p>
  <label></label>
  <label>
  <input type="radio" name="RadioGroup2" value="radio">
Radio</label>
  <br>
  <label>
  <input type="radio" name="RadioGroup2" value="radio">
Radio</label>
  <br>
  <label>
  <input type="radio" name="RadioGroup2" value="radio">
Radio</label>
<br>
</p>
</form>
<p>&nbsp;</p>
</body>
</html>
The above code shows a form split in two but on one has a submit button and one doest. I want to know if the user selects the submitt button that both post values are posted to the different scripts?

Would i have to take the button out of the form to execute it for both

Shab
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Each form requires a seperate page request to submit. So no.
shab620
Forum Commoner
Posts: 48
Joined: Tue Jan 18, 2005 7:50 pm

Post by shab620 »

ok, thanks for the Information

shab
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why not place them together, or span them across two pages?
Post Reply