I have a submit button when pushed inputs data into a database. I also have a checkbox where the user clicks if they agree. I want to make sure they clicked the checkbox before entering the data in the database. I was wondering how would I do something like this.
If the box is checked then
data would be entered.
If the checkbox is not selected then
Error message "you must check the box" // the screen would display this message.
I just don't know the syntax for doing the error. I have no problem with stuff entering the database, but I need a custom error. I would use javascript but this page reloads with info 3 times before the actual submit button appears for the user.
Any help would be great!
If the box is checked then
data would be entered.
If the checkbox is not selected then
Error message "you must check the box" // the screen would display this message.
I just don't know the syntax for doing the error. I have no problem with stuff entering the database, but I need a custom error. I would use javascript but this page reloads with info 3 times before the actual submit button appears for the user.
Any help would be great!