Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-16-2013, 07:01 PM   PM User | #1
didiem
New to the CF scene

 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
didiem is an unknown quantity at this point
Exclamation syntax error, unexpected T_BOOLEAN_OR

i have a error T_BOOLEAN_OR on my php
how to fix it
PHP Code:


if (!preg_match($nomor,$this->request->post['order_id'])) || ((strlen(utf8_decode($this->request->post['order_id'])) < 3) || (strlen(utf8_decode($this->request->post['order_id'])) > 100)) {
            
$this->error['order_id'] = $this->language->get('error_order_id');
        } 
didiem is offline   Reply With Quote
Old 02-16-2013, 08:34 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,584
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Check the brackets. The if bracket is erroneously closed after the first query already:
Code:
if (!preg_match($nomor,$this->request->post['order_id'])) || ((strlen(utf8_decode($this->request->post['order_id'])) < 3) || (strlen(utf8_decode($this->request->post['order_id'])) > 100))
Everything coming after that is wrong then. Correctly it needs to look like this:
Code:
if (!preg_match($nomor,$this->request->post['order_id']) || strlen(utf8_decode($this->request->post['order_id'])) < 3 || strlen(utf8_decode($this->request->post['order_id'])) > 100)
(I assume the three conditions are on the same level and not nested?)
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:59 AM.


Advertisement
Log in to turn off these ads.