| | |
syntax error, unexpected T_STRING
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 1
Reputation:
Solved Threads: 0
Hi,
I am trying to code to put a PayPal logo in a page. Here is the code:
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.
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.
PHP Syntax (Toggle Plain Text)
if ($show_MYK_PAYPAL == true) {
PHP Syntax (Toggle Plain Text)
if ($show_MYK_PAYPAL == "true") {
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
Similar Threads
- Parse error: syntax error, unexpected T_STRING (PHP)
- syntax error, unexpected $end in ndex.php on line 127 (PHP)
- "syntax error, unexpected T_STRING"...? (PHP)
- Parse error: syntax error, unexpected T_STRING in c:/.......... (PHP)
- unexpected T_STRING (PHP)
- Unexpected T_STRING? (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP Includes Apache 1.3.33 and a Mac
- Next Thread: disable a textbox
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert integration ip java javascript joomla ldap limit link login loop mail menu methods mlm mod_rewrite multiple multipletables mysql oop open parse paypal pdf php problem query radio random recursion regex remote script search server sessions sms soap source space speed sql structure syntax system table template tutorial update upload url validation validator variable video web xml youtube






