php problem

yoyoo's Avatar, Join Date: Oct 2007
Light Poster
hi guy can anybody sport the error

i get these error msg when i run the programme
Parse error: syntax error, unexpected $end in C:\wamp\www\nalanda\~phpdesigner_output_tmp.php on line 36 line 36 is at the end of the scritp
what could be the problem



PHP Code:
<?php
/* A collection of commonly used functions in OnLib */

require_once("conf.php");
function 
clean($input,$maxlength)
{
$input=substr($input,0,$maxlength);
$input=Escapeshellcmd($input);
return 
$input;
}
function 
showerror()
   {
?>
<html><body><p><p><p><p><p><p>    <?
      die("Error " . mysql_errno() . " : " . mysql_error());
   }
function isadmin()
{    
    if($_SESSION['bo_id'] != "ADMIN")
        {
        global $www;
        include("style.html");
        ?>
            <html><head><title>Must Be admin</title>
            <meta http-equiv="Refresh"
                content="5 ; URL=<?=$www?>/userf/login.php">
            </head>
            <br><br><center>
            <font color="brown"><h4>Only Administerators Can Access This Page</h4></font>
            <br>You will be redirected to <a href="<?=$www?>/userf/login.php">Login Page</a> in 5 seconds
            </center></body></html>

        <?
        exit;
        }
}    
?>

Last edited by shabbir; 24Oct2007 at 09:38.. Reason: Code block
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Now having so many posts you should know how to post the code in the posts and I would suggest you go through the Hints before you make a post.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
I think the problem is the tendency to switch back and forth between <?php and <?. If short_tags is turned off (because it has been deprecated), then the bits between <?...?> will be ignored by the parser, and that would cause problems. Indeed, replacing <? with <?php clears the error.