I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on.
Heres what i have
[code=php]
<?php
if(isset($_GET['login'])) {
echo "<div id="visible">" ;
echo "<span onclick="swapfo rm()">Log In Form</span>";
echo "</div>";
echo "<div id="theform" style="visibili ty: hidden">";
echo "<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">" ;
echo "<input type="text" value="Site Name" /><br />";
echo "<input type="submit" value="rub a dub" />";
echo "</form>";
echo "</div>";
}
?>
[/code]
and my error message is
Line 24 is line 4 up there.
Is there anything wrong there? or is some code getting mixed up with the php code?
Thanks alot
--
Kestrel
Heres what i have
[code=php]
<?php
if(isset($_GET['login'])) {
echo "<div id="visible">" ;
echo "<span onclick="swapfo rm()">Log In Form</span>";
echo "</div>";
echo "<div id="theform" style="visibili ty: hidden">";
echo "<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">" ;
echo "<input type="text" value="Site Name" /><br />";
echo "<input type="submit" value="rub a dub" />";
echo "</form>";
echo "</div>";
}
?>
[/code]
and my error message is
Code:
[b]Parse error[/b]: syntax error, unexpected T_STRING, expecting ',' or ';' in [b]/www/110mb.com/t/h/e/j/e/t/p/a/thejetpage/htdocs/test/index.php[/b] on line [b]24[/b]
Is there anything wrong there? or is some code getting mixed up with the php code?
Thanks alot
--
Kestrel
Comment