The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Empty Form Field Validation? Reply To: Empty Form Field Validation?


Thank you for the code.

I spent a week trying to get the other code to work so have been playing around with other scripts.

The validation part of your code works but there are a couple of issues. I have id as a PK. How do I pass a non value, bypass (I don’t know the correct term) this field so the script doesn’t generate an error?

You’re using the PDO method to connect to a DB. I would prefer to use my existing connection script as all the other pages in my website connect to it in that manner (and are not written in PDO) and I imagine if I switch over to the PDO script I will have to do a lot of debugging e.g. the I cannot login as usernames and passwords are no longer recognised, due to this statement in my authenticate script?

$Link = mysql_connect($Host, $User, $Password);

I wanted to get everything working before re-writing my code, which is one of the reasons I have been using older methods for validation.