Hello Everyone.
Trying to understand the working of forms and php...need clarification on a few things...
If a user clicks on a form and a variable value hasn't been entered in a text field does this default to a value of 0 (so its' isset')?
Are form values passed from forms automatically treat as strings? (can I change this or do I need to do a gettype / settype thing once the variables have been passed to the script?... the reason I am asking this is because I wish to check user submitted data and give a warning message if they input a string not a number on a form.
Would there be any difference to the answers to 1 & 2 if data is sent POST or GET?
#2 You can use is_numeric, and it will work fine.
#1 It will be 'set', and isset() will return true regardless. Use empty() instead.