![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 3
Rep Power: 0
![]() |
Multiple posts- checkboxes
Hey there firstly this is what I am trying to acheive:
Page 1: Html Form choose pizza size and quantity Page 2: choose toppings Page3: cost and details I have done page 1 and i can make that go to a php that shows what you have selected but i need help with being able to then choose toppings using multiple check boxes and then be able to go to the final page 3 with total cost and details. Thnx in Advance from Batch |
|
|
|
|
|
#2 |
|
Newbie
Join Date: May 2005
Location: the netherlands
Posts: 11
Rep Power: 0
![]() |
maybe you could show us what you've done so far, that might help us to help you
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
use checkboxes as opposed to radio buttons. i don't see the problem here.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#4 |
|
Newbie
Join Date: May 2005
Posts: 3
Rep Power: 0
![]() |
Page 1- <form action="toppings.php" method="POST">
<table border="1"> <tr> <td>What size pizza?</td> </tr> <tr> <td><INPUT TYPE=RADIO NAME="pizzasize" VALUE="0.99">Small-£0.99</td> </tr> <tr> <td><INPUT TYPE=RADIO NAME="pizzasize" VALUE="1.99">Medium-£1.99</td> </tr> <tr> <td><INPUT TYPE=RADIO NAME="pizzasize" VALUE="2.99">Large-£2.99</td> </tr> <tr> <td>Quantity <INPUT TYPE=TEXT NAME="quantity" SIZE="3"></td> </tr> <tr> <td><input type="submit" value="Toppings"/></td> </tr> </table> </form> Page 2- <h4><u>Cost so far..."</u></h4> Pizza Cost £ <?php echo $_POST["pizzasize"]?><br /> Quantity: <?php echo $_POST["quantity"]?><br /><br /> Total Cost: £0<br> <hr> <h3><u>Toppings.</u></h3> <br> <b>Meat toppings...</b> <br> <form action="cost.php" method="POST"> <input type="checkbox" name="toppings[]" value="chicken">Chicken<br> <input type="checkbox" name="toppings[]" value="beef">Beef<br> <input type="checkbox" name="toppings[]" value="ham">Ham<br> <input type="checkbox" name="toppings[]" value="pepperoni">Pepperoni<br> <input type="checkbox" name="toppings[]" value="spicy pork">Spicey Pork<br> <input type="checkbox" name="toppings[]" value="spicy chicken">Spicey Chicken <br> <b>Vegetable Toppings...</b> <br> <input type="checkbox" name="toppings[]" value="red pepper">Red Pepper<br> <input type="checkbox" name="toppings[]" value="mushroom">Mushroom<br> <input type="checkbox" name="toppings[]" value="chilies">Chilies<br> <input type="checkbox" name="toppings[]" value="green pepper">Green Pepper<br> <input type="checkbox" name="toppings[]" value="red onions">Red Onions<br> <input type="checkbox" name="toppings[]" value="tomato chunks">Tomato Chunks<br> <input type="checkbox" name="toppings[]" value="sweetcorn">Sweetcorn<br> <b> <input type="submit" value="Order"/> </form> Page 3- <h4><u>Cost</u></h4> <p> Your Order has been sucessfully sent here is what you have ordered: Pizza Cost £ <?php echo $_POST["pizzasize"]?><br /> Quantity: <?php echo $_POST["quantity"]?><br /><br /> Toppings: <?php echo $_POST["quantity"]?><br /><br /> I need help with making this final page work any suggestions would be useful |
|
|
|
|
|
#5 |
|
Newbie
Join Date: May 2005
Posts: 3
Rep Power: 0
![]() |
to bl00dninja i am trying to make all of the checkboxes be viewed on the third page Thnx again
|
|
|
|
|
|
#6 |
|
Hobbyist Programmer
Join Date: Sep 2004
Posts: 207
Rep Power: 5
![]() |
Inside the <input> tag put CHECKED or possibly SELECTED and it will show up already checked. Now you have to check that varibles to make sure it needs a check first but that isn't to hard.
Hope that works for ya!
__________________
_______________________________ BlazingWolf |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|