zpupster Posted September 19, 2010 Posted September 19, 2010 hello, if someone could help with this php problem. hello, i have this code to test for login on my new page, if logged in then customer can fill out a form . so i am changing things like this <?php echo $messageStack->output('contact'); ?> to '.php echo $messageStack->output('contact').' i am stuck on this one getting this <?php if ($messageStack->size('contact') > 0) { ?> when changed to '. if ($messageStack->size('contact') > 0) { .' error: Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in /home/mysite/public_html/store/buybacks.php on line 124 here is my login test. <?php if ( !tep_session_is_registered('customer_id') ) { // code for NON-LOGGED-IN goes here echo 'to use the buyback form you must be loggedin!'; } else { // code for LOGGED-IN goes here echo ' '; } ?> if there is an easier way to handle this any suggestions welcome, becasue there are like 30 of these that need to be changed, thanks craig
♥FWR Media Posted September 19, 2010 Posted September 19, 2010 You are trying to use the string concatenation operator with an if statement which is syntactically incorrect which is why you get a parse error. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
zpupster Posted September 20, 2010 Author Posted September 20, 2010 well is there a way around this at all.
♥FWR Media Posted September 20, 2010 Posted September 20, 2010 Yes there are some great tutorials on php.net detailing use of the concatenation operator, syntax etc. You really need to understand at least the basic syntax before attempting to modify files. Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.