Forum Moderators: coopster
Parse error: syntax error, unexpected $end in C:\XAMPP\xampp\htdocs\index2.php(21) : eval()'d code on line 10
this is the code in the db:
if (!isset($_GET['action'])){
echo"Action to undertake:<br>
<div style=\"link\">
<a href=\"index2.php?compo=".$_GET['compo']."&action=addcontent\">
Add content</a>
<br></div>";
}else{
if ($_GET['action']=='addcontent')
{
?><input name='sdf' value='fsd'><?
}}
[php.net...]
if (!isset($_GET['action'])){
echo"Action to undertake:<br>
<div style=\"link\">
<a href=\"index2.php?compo=".$_GET['compo']."&action=addcontent\">
Add content</a>
<br></div>";
}else{
if ($_GET['action']=='addcontent')
{
?><input name='sdf' value='fsd'><?
}}
Try this:
<?php
if (!isset($_GET['action']))
{
echo "Action to undertake:<br><div style=\"link\"><a href=\"index2.php?compo=".$_GET['compo']."&action=addcontent\">Add content</a><br></div>";
}
else
{
if ($_GET['action']=='addcontent')
{
?><input name='sdf' value='fsd'><?
}
}
?>
if that doesn't work... this will:
if (!isset($_GET['action']))
{
echo "Action to undertake:<br><div style=\"link\"><a href=\"index2.php?compo=".$_GET['compo']."&action=addcontent\">Add content</a><br></div>";
}
else
{
if ($_GET['action']=='addcontent')
{
echo "<input name='sdf' value='fsd'>";
}
}
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\XAMPP\xampp\htdocs\index2.php(23) : eval()'d code on line 3
Parse error: syntax error, unexpected $end in C:\XAMPP\xampp\htdocs\index2.php(23) : eval()'d code on line 9