Validating checkboxes in php dating sites catholics

Rated 3.86/5 based on 908 customer reviews

It seems I am having the same problem as I did when a radio button was included.

I am not getting the error message AND it seems the rest of the information will still be sent to the database whether the checkbox is checked or not.

Unfortunately, I think this is something you're going to have to debug on your own, as we're not going to take the time to look through all your code.margaux was the one that mentioned using HTML entities (e.g., –) in your HTML.

Honestly, I don't think it's that necessary, but all the same, to answer your question, his suggestion does not apply to things like '/^[A-Z \'.-]$/i'.

As a side, you shouldn't give your a element the same name and ID as the input element.

That could cause some issues in some browsers, especially if you are using Javascript. Also, what are you using an empty a element for (which doesn't have an href attribute, by the way)?

On some forums (not this one) people won't help unless you use standard practices. I didn't realize that I was using some non-standard practices.

I had used a capital letter on the "Agree" column in the database so this is why I was using a capital in my code, but I have changed this in all areas. I have reworked some of the form code many times since seeing your above reply and have posted it the way it is currently.

I would rather not use Javascript and don't understand why php would work with the rest of the fields but not with a checkbox or radio button. =\w*[A-Z])\w*)$/', $_POST['pass1']) ) else if (empty($reg_errors)) { // If everything's OK...

As such, with radio buttons and checkboxes, you have to first check for the existence of a value before you can even start parsing the value. You will very easily be able to see exactly what values are (or aren't) being sent to the $_POST array.

Without looking at your code, I have a feeling that this is the problem. With that code in place, try both selecting and not selecting the checkbox, and see how it affects your $_POST array.

After that, you should then check to see which radio button was clicked.

The value attributes of the input elements in the HTML form are the possible values that can be stored in the $_POST['consent'] array element when a radio button is selected.

Leave a Reply