When i try to run this script i get the error, Parse error: parse error, unexpected $ in /tier-2/pwpstore2/6/generalsworld/htdocs/scripts/php/test/newsup/loginaction.php on line 25, can anyone see why?
Line 25 is the last line of the script, the ?>
<?php
$username=($_POST['username']);
$password=($_POST['username']);
if(strstr($username, "djdaz") && strstr($password, "test"))
{ include($_SERVER["DOCUMENT_ROOT"].'/'.'nav.shtml');?>
Welcome <?php echo $username ;?>, what do you wish to do?
<br>
<a href="/addnews.php?username=<?php echo $username ;?>">Add news</a><br>
<?php
include($_SERVER["DOCUMENT_ROOT"].'/'.'footer.shtml') ;}
else
{if(strstr($username, "djdaz") && strstr($password, "tester"))
{ include($_SERVER["DOCUMENT_ROOT"].'/'.'nav.shtml');?>
Welcome <?php echo $username ;?>, what do you wish to do?
<br>
<a href="/addnews.php?username=<?php echo $username ;?>">Add news</a><br>
<?php
include($_SERVER["DOCUMENT_ROOT"].'/'.'footer.shtml') ;}
else
{ include($_SERVER["DOCUMENT_ROOT"].'/'.'nav.shtml') ;?>
Your username or password is incorrect
<?php
include($_SERVER["DOCUMENT_ROOT"].'/'.'footer.shtml') ;}
?>
Thanks