I am getting value from sql db and making option by setting Radio for unique values. For this reason i am placing value = '<?php $row[' ']..... ;?>'
but i am getting error every time. Looks like i am not doing correctly passing php in value
bcz when i remove then everything gets fine. Any one can guide please.
Code:
while($row = mysql_fetch_array($query) or die(mysql_error())){
echo '<form>';
while ($row=mysql_fetch_array($query))
{
echo '<div class="boxed" >';
echo "\t".'<tr><th>'.$row['question']."<br>".'</th><th>'."<input type='radio' name='optn' value=' <?php $row['A']; ?> '>".$row['A']."<br>".'</th><th>'."<input type='radio' name='optn' value='<?php $row['B']; ?>'>".$row['B']."<br>".'</th><th>'."<input type='radio' name='optn' value='<?php $row['C']; ?>'>".$row['C']."<br>".'</th><th>'."<input type='radio' name='optn' value='<?php $row['D']; ?>'>".$row['D'].'</th></tr>';
// echo '<tr><th>'.'<font size="5" color=#07c >'."<a href='reply.php?name=$id'>".$row['qtitle']."</a>".'</font>'.'</th><th>'."          ".'<font size="2" color=#07c >'.$row['Date']."   ".$row['Time']."<br>".'</font>'.'</th><th>'.$row['askquestion'].'</th></tr>';
// echo"<th> <a href ='delete.php?name=$id'><center>Delete</center></a></th></tr>";
echo '<input type="submit" name="submit" />';
echo '</div>';
}
echo '</form>';
}
Error:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\New folder\htdocs\website\Quizes.php on line 245