0

Hi folks, having a bit of bother trying to post my values to another page using radio buttons. I have an exisiting form that I wanted to add the below code to. The form currently posts comments however I want it to post ratings of DVD's on the site. The error I am getting is:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in..

The error occurs on the first line of my code.. Any help would be appreciated.. Thanks

<input name="rating" type="radio" value="1" <?php if ($rating==1) echo "checked"?>>1
              <input name="rating" type="radio" value="2" <?php if ($rating==2) echo "checked"?>>2
              <input name="rating" type="radio" value="3" <?php if ($rating==3) echo "checked"?>>3
              <input name="rating" type="radio" value="4" <?php if ($rating==4) echo "checked"?>>4
              <input name="rating" type="radio" value="5" <?php if ($rating==5) echo "checked"?>>5
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by as.bhanuprakash
0

All you need to do is add a semicolon after the echo statement i guess...

<input name="rating" type="radio" value="1" <?php if ($rating==1) echo "checked";?>>1
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.