hi all
im having a little trouble with a PHP Echo
now if you look at the output
i need them both to read
however this does not work
any ideas?
im having a little trouble with a PHP Echo
PHP:
<?php
$strSQL = "SELECT * FROM game";
$result = mysql_query($strSQL);
$row = mysql_fetch_assoc($result);
$chkbox1 = $row['chkbx1'];
$chkbox2 = $row['chkbx2'];
echo '
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<meta charset=utf-8 />
<title></title>
</head>
<body>
<table>
<tr>
<td>1</td>
<td><input type="checkbox" name="chkbox1" value="1"
';
if ($chkbox1 == 1)
{
echo ' checked="checked"> ';
}
echo '
</tr>
<tr>
<td>2</td>
<td><input type="checkbox" name="chkbox2" value="1"
';
if ($chkbox2 == 1)
{
echo ' checked="checked"> ';
}
echo '
</td>
</tr>
</table>
<div style="display:none">0</div>
</body>
</html>
';
?>
now if you look at the output

i need them both to read
Code:
checked="checked">
however this does not work
any ideas?