Can I return a result from a javascript confirm box into my php if statement?
Here's the idea of what I'm doing:
How many hours did you work?
User can type in any 1 number (1-9)
User clicks submit.
If statement looks to see if the form was sent, if so it looks at what the user entered from hours worked. And I javascript confirm with the user that they entered the hours correctly. Example. "User! You have entered that you worked 3 hours. Is that correct?"
If they said OK to that last confirm then the if statement goes on to look at the hours worked. If the hours are LESS then 8, it confirms again with the user. To tell them they haven't worked a full day, and are they sure they want to confirm.
If they said OK to this last confirm then the form submits. If to EITHER of the confirms they say CANCEL the form needs to NOT submit.
So, can I return those confirm boxes back into the PHP if statement so I can check to see if they clicked OK or CANCEL?