Checkboxes with php -
this question has answer here:
i trying make delete option in messages exchange application delete messages inbox or sent. doing wrong in echo "
parse error: syntax error, unexpected '' (t_encapsed_and_whitespace), expecting identifier (t_string) or variable (t_variable) or number (t_num_string) in c:\program files (x86)\easyphp-devserver-14.1vc9\data\localweb\test\msg\inbox.inc.php on line 45
while ($rows = mysql_fetch_assoc($view_msg)) { $id = $rows['id']; echo "<tr>"; echo "<td>"; echo "<input name='checkbox[]' type='checkbox' id='checkbox[]' value='<?php echo $rows['id']; ?>' >"; echo "</td>"; echo "<td>"; echo "".$from = $rows['from_user'].""; echo"</td>"; echo "<td><a href='messages.php?id=read&mid=$id'>".$subject = $rows['subject']. "</td>"; echo "<td>"; echo "".$date = $rows['date']. ""; echo "</td>"; }
change this
echo "<input name='checkbox[]' type='checkbox' id='checkbox[]' value='<?php echo $rows['id']; ?>' >";
to
echo "<input name='checkbox[]' type='checkbox' id='checkbox[]' value='".$rows['id']."' >";
also these
echo "".$from = $rows['from_user']."";
and
echo "".$date = $rows['date']. "";
to
echo $from = $rows['from_user'];//if need store value in $from otherwise no need of echo $date = $rows['date'];//same here
Comments
Post a Comment