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 11 of 11

Thread: Unexpected end

  1. #1
    TrainReq
    Guest

    Unexpected end

    I am getting:
    Parse error: syntax error, unexpected $end in /home/***/public_html/bulletinposter.php on line 266
    The source is at http://hellaadds.com/bulletinposter.phps ... any idea what is causing the error?

    Tell me on wich line to do what, etc.

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    All I can say as of now is look in your code and make sure you have closed all your loops and structures, and put semicolons on all the lines. beyond that, post code for more help



    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    TrainReq
    Guest
    I did post code... please see http://hellaadds.com/bulletinposter.phps for the code

  • #4
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts
    train - I see 2 open else's...?

    PHP Code:
       else
       {
       print 
    "working data: ".$post_data['email']."<br>";
    $email=$post_data['email']; 

  • #5
    TrainReq
    Guest
    what should i do to fix? and what line do i go on?

  • #6
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts
    well the first thing is it's not validating - there's no doctype

    I couldn't tell ya where to close the else curlies...but it would appear that there's
    • an else on line 46 (I'm using dreamweaver) that doesn't have a closing curly
    • an if statement on line 104 that doesn't have curlies around the echo
    • an else on line 106 that isn't closed

  • #7
    TrainReq
    Guest
    how do I close an else?

  • #8
    Regular Coder harlequin2k5's Avatar
    Join Date
    Sep 2005
    Location
    Holiday, FL
    Posts
    635
    Thanks
    18
    Thanked 0 Times in 0 Posts
    I'm sorry - the else has an open "{" but no closing "}"

    but not knowing the function your script is performing I don't know where it should close...

  • #9
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Quote Originally Posted by TrainReq
    I did post code... please see http://hellaadds.com/bulletinposter.phps for the code
    My bad, I didn't follow the link, I thought it had a .php ending...

    My Apologies!
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #10
    TrainReq
    Guest
    Fixed end errors... now i am getting

    Warning: fclose(): supplied argument is not a valid stream resource in /home/************/public_html/bulletinposter.php on line 67

    Warning: strpos() [function.strpos]: Offset not contained in string. in /home/***************/public_html/bulletinposter.php on line 177

    Warning: strpos() [function.strpos]: Offset not contained in string. in /home/********/public_html/bulletinposter.php on line 181

    Warning: strpos() [function.strpos]: Offset not contained in string. in /home/*******/public_html/bulletinposter.php on line 206

    Warning: strpos() [function.strpos]: Offset not contained in string. in /home/*******/public_html/bulletinposter.php on line 209

  • #11
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    For the first warning:

    Shouldn't it be
    PHP Code:
    $file fopen("function.txt""w+");
    fclose($file); 
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Posting Permissions

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