I have a string that is defined early in the script. For example....
$name = juschillinnow;
Later on in the script I have a form where you can specify your name.
My problem is that I need to check to see if the form was left blank or not.
I use: if(!$name){ something}
Is there a way to check if the submitted form was left blank?? Otherwise $name will never be blank because I tell the script what the default value is earlier. But I really need to check to see if the form was blank.
I tried using javascript like: if(!document.form.value = ''){alert('something');}
But I really don't like using that and it continues to run the script as client side.
Any suggestions on how to solve this problem.....Does PHP have a built in function to validate forms?