dinga301124 Posted March 13, 2008 Share Posted March 13, 2008 hey, very new at all this wondering if anyone could help me out. using php I want the form to display the cost of a pizza when the user chooses a radio button (Small, Large or medium), selects any extras using checkboxes (olives, tomato,beef,pineapple, ham, capsicum) and then hits the submit button. When small pizza = $5 medium pizza = $7 large pizza = $10 and all extras are $2 each. this is my form: <body> <form action="price.php" method="POST"> <p>Pizza size:</p> <p><input type="radio" name="size" id="small" value="small" /> <label for="small">small</label><br /> <input type="radio" name="size" id="medium" value="medium" /> <label for="medium">medium</label><br /> <input type="radio" name="size" id="large" value="large" /> <label for="large">large</label><p> <p>Optional extras:</p> <p><input type="checkbox" name="extras[]" id="olives" value="olives" /> <label for="olives">olives</label><br /> <input type="checkbox" name="extras[]"id="tomato" value="tomato" /> <label for="tomato">tomato </label><br /> <input type="checkbox" name="extras[]"id="beef" value="beef" /> <label for="beef"> beef</label><br /> <input type="checkbox" name="extras[]" id="pineapple" value="pineapple" /> <label for="pineapple">pineapple</label><br /> <input type="checkbox" name="extras[]" id="ham" value="ham" /> <label for="ham">ham</label> <br /> <input type="checkbox" name="extras[]" id="capsicum" value="capsicum" /> <label for="capsicum">capsicum</label></p> <p><input type="submit" name="Submit" value="Submit" /> <input type="reset" name="Reset" value="Reset" /></p> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
revraz Posted March 13, 2008 Share Posted March 13, 2008 Show us price.php too. And don't reply with "that's what you want help with" and not do any of it, at least start it and show us what you've attempted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.