DBookatay Posted October 5, 2007 Share Posted October 5, 2007 Can someone spot an error: if(strlen($_POST['vin']) == 6) {$where[] = "vin LIME '%$_POST['vin']'";} else {$where[] = "vin = '$_POST['vin']'";} I get the following Parse Error: "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/.phillipina/dbookatay/login.carcityofdanbury.com/passed/New/list.php on line 242" and I cant figure out why... Quote Link to comment Share on other sites More sharing options...
teng84 Posted October 5, 2007 Share Posted October 5, 2007 if(strlen($_POST['vin']) == 6) { $where[] = "vin LIME '%{$_POST['vin']}'"; } else { $where[] = "vin = '{$_POST['vin']}'"; } // or ------------ if(strlen($_POST['vin']) == 6) { $where[] = "vin LIME '%".$_POST['vin']."'"; } else { $where[] = "vin = '".$_POST['vin']."'"; } Quote Link to comment Share on other sites More sharing options...
DBookatay Posted October 5, 2007 Author Share Posted October 5, 2007 $where[] = "vin LIME '%".$_POST['vin']."'"; Do you mean "LIKE" or is "LIME" correct? Quote Link to comment Share on other sites More sharing options...
teng84 Posted October 5, 2007 Share Posted October 5, 2007 yes? heres an issue with '$var['foo']' once you enclose your array with '' or "" php is confuse how to read it and can you tell me why u use this phillipina as your dir name is that your country? Quote Link to comment Share on other sites More sharing options...
DBookatay Posted October 5, 2007 Author Share Posted October 5, 2007 and can you tell me why u use this phillipina as your dir name is that your country? Thats what my hosting company (DreamHost.com) uses... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.