Hello. I am in need of a PHP expert to help me out with a little line of code. Basically, the site I need this fixed for is a Craigslist phone verified account seller, and when they click buy, it attempts to go to the buy page and I get a syntax error: Parse error: syntax error, unexpected $end in /home/xxxxxxxx/public_html/paypal.php on line 70 Code (markup): Here is line 70: ?> Code (markup): And a few lines above, including line 70: if(constant('thanks_page')!=""){ $return_url=urlencode(constant('domainurl')."/".constant('thanks_page')."; $buyNow->addVar('return_url',$return_url); } header('Location: '.$buyNow->getLink()); require_once('clearresource.php'); ?> Code (markup): If someone could help me, or if you need more information, just let me know. Thanks, appreciated very much! Whoever helps will get +rep.
I'm no PHP expert but I think the problem is: if(constant('thanks_page')!=""){ $return_url=urlencode(constant('domainurl')."/".constant('thanks_page')."[B][COLOR="Red"])[/COLOR][/B]; $buyNow->addVar('return_url',$return_url); } header('Location: '.$buyNow->getLink()); require_once('clearresource.php'); ?> Code (markup): You need to close the urlencode() function. I've put the parentheses in Red where it has to be placed. Try to see if it works.
If you use programs with code highlighting it would pick up such problems and it will make your coding way easier. Just my 2 cents.
Well I always used "PHP Editor" it has some small bugs, like freezing sometimes, then you have to pay attention and keep saving your work everytime. But even with this bug it's the best editor I ever used. *It comes in Portuguese, but after instalation you can set its langague to English.