Search the Community
Showing results for tags 'radiobutton'.
-
for starters, i am a complete beginner at PHP, so i know almost nothing. so, the basic outline is that i am required to create a table with 2 columns, and use PHP where i can so the first set of code lays down the table and the ability to type in text of "name" and "surname". ----i think this "input" is HTML, yes?? is there a way to enter it as PHP? <table border=\"2\"> <tr><th><b>Requirements</b></th><th><b>Selections</b></th></tr> <tr><td>Name</td><td><input type="text" name="name"/></td></tr> <tr><td>Surname</td><td><input type="text" name="surname"/></td></tr> so, for this next section, adding on is the part for "age". i want this to appear as a dropdown selection. i've written PHP where possible, however this does not work when opening the file in a browser. it simply leaves a blank dropdown menu with no options. ???? <tr><td>Age</td><td><select> <?php for ($num=11; $num<=22; $num++){ echo '<option>' .$num. '</option>'; } ?> </select> lastly, i have the part for "activity choice". this again i believe i wrote the radio buttons in HTML??? am i able to write this as PHP???? <tr><td>Activity Choice</td><td><input type="radio" name="activityChoice" value "music"/> Music ($30.00)<br> <input type="radio" name="activityChoice" value "swimming"/> Swimming ($25.50)<br> <input type="radio" name="activityChoice" value "tennis"/> Tennis ($20.00)<br> <input type="radio" name="activityChoice" value "basketball"/> Basketball ($15.50)<br> <input type="radio" name="activityChoice" value "netball"/> Netball ($15.50)<br> <input type="radio" name="activityChoice" value "dance"/> Dance ($10.50)<br> <input type="radio" name="activityChoice" value "communityService"/> Community Service (No Charge)</td></tr> please please please help??
-
Hi all, I am trying to make sure that a user cannot move on unless they select a radiobutton, but unfortunately it's not working. I used same function with checkbox in my other page and it works perfect but i don't know why it is not working here Btw, this is not inside a form (as in other page I have used inside the form) PLEASE HELP echo "<td class='kooltd'><input type = 'radio' name = 'rFlight' value = '".$row['flight_id']."'></td>"; echo "<input type='submit' id='button1' name='booking' value='Make Booking for the Selected Flight' onclick='if(!this.form.rFlight.checked){alert('You must select a flight.');return false}'/></br>";
- 3 replies
-
- php
- radiobutton
-
(and 2 more)
Tagged with: