I am trying to make a table that gets user input about different wines. I made the form for the radio buttons with html but the code is way too long and I know I can make a function to spit out all the code with a simple call. The function I made is called radio($reply) and I call it in the html with php tags. But I am stuck and I get the error:
Parse error: syntax error, unexpected T_STRING in /home/students/au421504/public_html/project1.php on line 69
I know it is probably something I am doing wrong that I don't know that you can't do yet but that is the reason I am here, so I can figure out what that is.
Here is the code below:
<?php
function radio($reply)
{
for($i=1; $i<=4; $i++)
{
print "<td><input name=".$reply." type="radio" value=".$i.">$i</td>";
}
}
?>
<p>
<center>
<img src="http://sulley.dm.ucf.edu/~au421504/1220217_55804827.jpg" width="200" height="150"/>
<form action="file:///C|/Users/Aust/Documents/Websites/BID/burnedimagedesigns/project1.php" method="POST">
<table border="4" cellspacing="0" cellpadding="4">
<tr>
<th scope="col"><span style="color:#30F">Winery</span></th>
<th scope="col"><span style="color:#39F">Wine Type</span></th>
<th scope="col"><span style="color:#060">Excellent</span></th>
<th scope="col"><span style="color:#CC0">Good</span></th>
<th scope="col"><span style="color:#F60">Fair</span></th>
<th scope="col"><span style="color:#F00">Poor</span></th>
</tr>
<tr>
<td>Boone Farm </td>
<td>Burgundy</td>
<?php
radio("reply1");
?>
<!-- <td>
<input name="reply1" type="radio" value="1">
1</td>
<td>
<input name="reply1" type="radio" value="2">
2 </td>
<td>
<input name="reply1" type="radio" value="3">
3</td>
<td>
<input name="reply1" type="radio" value="4">
4</td>-->
</tr>
<tr>
<td>Ripple </td>
<td>Red</td>
<?php
radio("reply2");
?>
<!-- <td>
<input name="reply2" type="radio" value="1">
1</td>
<td>
<input name="reply2" type="radio" value="2">
2 </td>
<td>
<input name="reply2" type="radio" value="3">
3</td>
<td>
<input name="reply2" type="radio" value="4">
4</td>-->
</tr>
<tr>
<td>Yellow Tail </td>
<td>Shiraz</td>
<?php
radio("reply3");
?>
<!-- <td>
<input name="reply3" type="radio" value="1">
1</td>
<td>
<input name="reply3" type="radio" value="2">
2 </td>
<td>
<input name="reply3" type="radio" value="3">
3</td>
<td>
<input name="reply3" type="radio" value="4">
4</td>-->
</tr>
<tr>
<td>Christian Brothers </td>
<td>Chianti</td>
<?php
radio("reply4");
?>
<!-- <td>
<input name="reply4" type="radio" value="1">
1</td>
<td>
<input name="reply4" type="radio" value="2">
2 </td>
<td>
<input name="reply4" type="radio" value="3">
3</td>
<td>
<input name="reply4" type="radio" value="4">
4</td>-->
</tr>
<tr>
<td>Lindemann </td>
<td>Champagne</td>
<?php
radio("reply5");
?>
<!-- <td>
<input name="reply5" type="radio" value="1">
1</td>
<td>
<input name="reply5" type="radio" value="2">
2 </td>
<td>
<input name="reply5" type="radio" value="3">
3</td>
<td>
<input name="reply5" type="radio" value="4">
4</td>-->
</tr>
<tr>
<td>Lindemann </td>
<td>Zinfandel</td>
<?php
radio("reply6");
?>
<!-- <td>
<input name="reply6" type="radio" value="1">
1</td>
<td>
<input name="reply6" type="radio" value="2">
2 </td>
<td>
<input name="reply6" type="radio" value="3">
3</td>
<td>
<input name="reply6" type="radio" value="4">
4</td>-->
</tr>
</table>
<br><input type="submit" value="SUBMIT">
</form>