Results 1 to 3 of 3

Thread: Error: Expected ;

  1. #1
    Join Date
    Jul 2010
    Posts
    228
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Default Error: Expected ;

    Good day!

    I encountered an error at line 26, error: expected ';'

    I can't see what is the cuase of that error.

    I attached my codes.

    Thank you

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    you didn't include { } brackets after your if() condition on line 25, so php thinks it's a single-line "if" and can't find the closing semicolon:
    PHP Code:
    if(mysql_num_rows($result_no) > )

                
    $clicking_input 0;

                
    $clicking_total 0;
    // should be:
    if(mysql_num_rows($result_no) > )
    {  
    // <--right there!  : )
                
    $clicking_input 0;

                
    $clicking_total 0;
    // and however far down you want the closing } 
    Last edited by traq; 12-15-2010 at 03:14 AM.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,953
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Just on a hunch, I'd say get rid of the highlighted:

    Code:
    <body onLoad="document.clttest.clt_no.focus();">
    If that doesn't work -

    Is that a javascript error or a PHP error? If it's javascript, we need to see the served source code, so either give us a link to the live page, or:

    1. Load up the page that's giving you this error in the browser.

    2. Use the browser's 'view source' to see the source code being served.

    3. Select all and copy.

    4. Paste that into a text file, save and attach that text file to a post here.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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