I don't really want to take it off, only to then put it back on, ultimately I need it in order for the search to work. All stored values start with 'CR', it's just that people don't always input the 'CR' when performing a search, if they don't, then I must add it in. The rest of the search string, the numeric portion could be anything, hense I was trying to use a wildcard. All of the examples for things like trim, are based on the rest of the value being a known quantity, whereas I can't specify them because I don't know what they'll be, again hense the wildcard.
if (($_POST[CR] != '') && ($_POST[CR] != 'CR'*))
{
$_POST[CR] = 'CR$_POST[CR]';
}
The idea of the above is to check the posted value to see if it starts with a CR, if it doesn't, the CR is added. Does anyone know what I need to do to make that work, obviously the wildcard bit doesn't, seems like a reasonable thing to want to do though??