Quantcast

Maximum PC

It is currently Mon Dec 22, 2014 6:36 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: PHP error
PostPosted: Fri Jun 05, 2009 8:05 pm 
8086
8086

Joined: Fri Sep 05, 2008 6:35 pm
Posts: 76
Hey guys I am trying to teach myself php and I have no idea why I am getting
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 6

Code:
<?php
session_start();
require_once('recaptchalib.php');
$publickey = "<I REMOVED THE KEY>";
if(isset($_SESSION[‘passCaptcha’]) && $_SESSION[‘passCaptcha’] == false){
echo ‘help me’;
}
?>


These are the first eight lines of my file which are then followed by HTML.
I have also tried to use double quotes and that doesn't work either.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 08, 2009 5:44 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Take a look at your if statement. After just quickly looking at it that is where I think the problem is.

You should have your compounded statements look something like this:

Code:
IF ((Condition1) && (Condition2))
{
    // Do Stuff
}


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 08, 2009 11:44 am 
8086
8086

Joined: Fri Sep 05, 2008 6:35 pm
Posts: 76
CrashTECH,

Thanks for your help. However, I actually discovered my problem last night. If you will notice all of the single quotes, or what I thought to be single quotes were actually smart quotes (I think that's what they're called, it's the ones that on the key before the 1 key). I was using an editor called text wrangler on my mac and it has a feature that automatically uses these smart quotes instead of single quotes. Thanks for your help in this matter.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 08, 2009 12:19 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Yeah... I hate that. Just wait till you are translating data and it is littered with those.

=/


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 09, 2009 9:23 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
CrashTECH wrote:
Yeah... I hate that. Just wait till you are translating data and it is littered with those.

=/


Worse yet try parsing a *.csv file with embedded smart quotes and then forwarding it up to a mainframe and watch the mainframe job go ?? WHA? I Don't Understand You!! Dave? What are you doing Dave? KEEERRAAAASSSHHH

"Your perfectly good JCL Job Abended cause some shmo in"
"operations loaded the data file with embedded smart quotes instead of"
"embedded apostrophes"

"Batch Process Terminating" "Autopage for Sev1 Sent to Ops"
"Director for review." "Your Resume Auto posted to Monster.com"
"as a convenience to help you find your next employment station"

"Have a nice day :D "

:shock: :shock: :shock:


Top
  Profile  
 
 Post subject:
PostPosted: Tue Jun 09, 2009 9:31 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24238
Location: Granite Heaven
MaxFan wrote:
"Your Resume Auto posted to Monster.com"
"as a convenience to help you find your next employment station"

"Have a nice day :D "

:


:lol:

That was hilarious.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jun 15, 2009 7:13 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
Jipstyle wrote:
MaxFan wrote:
"Your Resume Auto posted to Monster.com"
"as a convenience to help you find your next employment station"

"Have a nice day :D "

:


:lol:

That was hilarious.


Glad to make your day Jip. But seriously, with the exception of the Monster.com part I have seen just such Abend messages in Batch especially around End Of Month.

BA's will use whatever tool they like to edit something some like notepad some like textpad some like Vi and all of them have differences in the way certain text characters are handled and they will dump raw text files embedded with the weirdest crap and then get all pissy when the job abends because they used a new editing or proofing tool.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.