syntax error, unexpected T_STRING

Reply

Join Date: Dec 2007
Posts: 1
Reputation: rtx is an unknown quantity at this point 
Solved Threads: 0
rtx rtx is offline Offline
Newbie Poster

syntax error, unexpected T_STRING

 
0
  #1
Dec 4th, 2007
Hi,
I am trying to code to put a PayPal logo in a page. Here is the code:

<?php 
// ----------------------------------- 
// PAYPAL ACCEPTED ITEM 
// ----------------------------------- 

// test if box should be displayed 
$show_MYK_PAYPAL = true; 

if ($show_MYK_PAYPAL == true) { 
?> 

<div align="center" style="padding:5px;"> 
<!-- PayPal Logo --><table border="0" cellpadding="10" cellspacing="0" align="center"><tr><td align="center"></td></tr>
<tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img src="https://www.paypal.com/en_GB/i/bnr/vertical_solution_PP.gif" border="0" alt="Solution Graphics"></a></td></tr></table><!-- PayPal Logo --> 
</div> 

<?php } 
?>

The bit I have highlighted red is straight from the PayPal web site. I am getting the following error message:
Parse error: syntax error, unexpected T_STRING in MYK_PAYPAL.php on line 7
Line 7 is the one that says: $show_MYK_PAYPAL = true;

I am no expert in PHP, in fact I have never programmed in PHP... if anyone can say what the problem might be I would be very grateful.

Thanks.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: syntax error, unexpected T_STRING

 
0
  #2
Dec 4th, 2007
  1. if ($show_MYK_PAYPAL == true) {
That should be
  1. if ($show_MYK_PAYPAL == "true") {
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC