Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Error?

  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Posts
    202
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error?

    I don't under stand this error can some one help me
    Code:
    Parse error: syntax error, unexpected $end in c:\program files\apache group\Apache\htdocs\chat\admin\chat.php on line 48
    the file is
    Code:
    <?
    include "aup.php";
    echo "
    <html>
    <head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    </head>
    <body align='center' onLoad='msg()'>
     <center>
     <iframe src='filer.php' width='95%' height='85%' name='as'>
     </iframe>
     <br>
     <table width='95%'>
     <tr>
     <td align='center' width='100%'>
     <form action='chat.php' method='post'>
     Message : <input name='msg'size=60>
     <input type='submit' name='send' value='Send'>
     <br>
     </form>
     </td>
     </tr>
     </table>
     </body>
     </html>";
    $name=$_COOKIE["name"];
    if (isset($_POST['msg']))
    {
    $name= "Dj-Kura";
    if (isset($_POST['msg']))
    {
    $file = "../file.txt";
    $msg = $name . ":" . $_POST['msg'] . "||";
    $fp = fopen($file, "r"); 
    $contents = fread($fp, filesize($file));
    $x = explode("||",$contents);
    $num = count( $x );
    fclose($fp);  
    $fp = fopen ($file, 'w');
    for ( $i = 1; $i <= $num; $i++ ) 
    { 
    $msg = $msg . $x[$i-1] . "||";
    } 
    fwrite ($fp, $msg);
    fclose ($fp);
    }
    Echo "Please Input a Message";
    ?>
    From what i know line 48 is the last one before the ?>

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    You're missing a closing curly bracket }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •