heredoc not acting correctly [SOLVED]
Posted: Sat Apr 07, 2007 2:34 pm
PHP5 does not reconize the heredoc end tag.
And the end tag is to the far left, and no code is above or below the end tag?
Any ideas why?
And the end tag is to the far left, and no code is above or below the end tag?
Any ideas why?
Code: Select all
<?
$letter = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C",
"D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",
"T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"0");
$color1 = "#e0e0e0";
$color2 = "white";
$result = mysql_query("SELECT * FROM loginphp ORDER BY id") or die(mysql_error());
$i = 0;
$counter = 0;
while ($row = mysql_fetch_array($result))
{
$Uname = $row['Uname'];
$id = $row['id'];
$password = $row['Pword'];
$row_color = ($i % 2) ? $color1:$color2;
if ($id == 1)
{
$status = " DISABLED";
$level = "YES";
}
else
{
$status = "";
$level = "NO";
}
$val = str_replace($letter, "*", $password);
$HTML = <<<__html__
<form name="update" action="EditUser.php">
<input type="hidden" name="USER" value="$Uname">
<tr>
<td align="center" bgcolor="$row_color">
<input type="radio" name="ACTION" value="edit"$status>
</td>
<td align="center" bgcolor="$row_color">
<input type="radio" name="ACTION" value="delete"$status>
</td>
<td align="center" bgcolor="$row_color">$Uname</td>
<td align="center" bgcolor="$row_color">$val</td>
<td align="center" bgcolor="$row_color">$level</td>
<td align="center" bgcolor="$row_color">
<input type="image" src="../images/new/submit.gif" value="SUBMIT">
</form>
</td>
</tr>
__html__;
echo $HTML;
$i++;
$counter++;
}
?>