PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have submit with two fields $_POST['osta_sodur'] and $_POST['osta_sodur1'] now i need to control does these numbers contains '-' or not. If not, proceed to other function's. If it contains '-' cancel the operation and say error to user.
i thinked something like that:
strpos() will return '0' which evaluates as false if the '-' is the first character in the string, which is likely. If it's numbers you're testing, why not try:
Kieran Huggins wrote:strpos() will return '0' which evaluates as false if the '-' is the first character in the string, which is likely. If it's numbers you're testing, why not try: