...

View Full Version : Unexpected end



TrainReq
12-22-2006, 11:30 PM
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.

whizard
12-22-2006, 11:37 PM
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

TrainReq
12-23-2006, 12:18 AM
I did post code... please see http://hellaadds.com/bulletinposter.phps for the code

harlequin2k5
12-23-2006, 12:37 AM
train - I see 2 open else's...?


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

TrainReq
12-23-2006, 12:39 AM
what should i do to fix? and what line do i go on?

harlequin2k5
12-23-2006, 12:51 AM
well the first thing is it's not validating (http://validator.w3.org/check) - 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 echoan else on line 106 that isn't closed

TrainReq
12-23-2006, 12:54 AM
how do I close an else?

harlequin2k5
12-23-2006, 12:58 AM
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...

whizard
12-23-2006, 01:35 AM
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

TrainReq
12-23-2006, 01:43 AM
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

whizard
12-23-2006, 01:52 AM
For the first warning:

Shouldn't it be


$file = fopen("function.txt", "w+");
fclose($file);


Dan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum