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 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2005
    Location
    Louisville, Kentucky
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unexpected $end on ... at line 49

    Ok, this error has been driving me crazy, my server returns this error:

    Parse error: syntax error, unexpected $end in c:\program files\e-novative\WAMP\www\my_homepage_beta\check_queryString.phpon line 49


    Although, no matter how long I look at the code (and now I've got a head ache) I can't find where the error is, here is the code for the check_queryString.php:

    PHP Code:
    <?php
    function build_session_info() {
        
    $info_array = array(
            
    "session_id" => $_SESSION["sess_cookie"]["phpsessid"],
            
    "web_id" => $_SESSION["sess_cookie"]["web_id"],
            
    "browser" => $_SESSION["sess_cookie"]["browser"],
            
    "remote" => $_SESSION["sess_cookie"]["remoteaddr"]
        );
        
    $sess_id "Session Id: <b>".$info_array["session_id"]."</b><br />";
        
    $web_id "Website Id: <b>".$info_array["web_id"]."</b><br />";
        
    $browser "Browser Info: <b>".$info_array["browser"]."</b><br />";
        
    $remote "Remote Address: <b>".$info_array["remote"]."</b><br />";
        
        
    $string $sess_id.$web_id.$browser.$remote;
        
        echo 
    $string;
    }
    function 
    build_news() {
        echo 
    "
            <div class=\"news_head\">
                Top News
            </div>
            <div class=\"connect\">
                No News
            </div>
        "
    ;
    }
    function 
    check_queryString() {
        
    $q $_REQUEST["q"];
        if ( isset ( 
    $_REQUEST["q"] ) ) {
            if ( 
    $q == "info" ) {
                
    build_session_info();
            }
            else if ( 
    $q == "news" ) {
                
    build_news();
            }
            else if ( 
    $q == "logout") {
                if ( isset ( 
    $_SESSION["LOGIN"]["UNVALID"] ) ) {
                    if ( 
    $_SESSION["LOGIN"]["UNVALID"] == "UNVALID" ) {
                        
    unvalid_Logout();
                    }
                    else {
        `
                    check_Logout();
                    }
                }
            }
        }
    }
    ?>
    Note, this page is linked to a larger network so I'm guessing there might be an error in the code of another page, but then it would return an error on that page right ?

    Any help in this would be great because my 14 yr old head is about to explode, thanks for reading.
    What was I thinking?
    Email Me

  • #2
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    did you try to find where you define $end and use it?

  • #3
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Remove the backtick (`).
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #4
    New Coder
    Join Date
    Nov 2005
    Location
    Louisville, Kentucky
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OMG, sorry i wasted your time, i cant beleive i missed that. Thanks anyway.
    What was I thinking?
    Email Me

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You could use a bigger font .
    BTW thesavior,
    that $end is not a variable. PHP just found the end of it's code before it should... in the middle of a string.
    Last edited by marek_mar; 01-05-2006 at 01:43 AM.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #6
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    oh...okay...thanks for letting me know.


  •  

    Posting Permissions

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