KateMacwil Posted May 14, 2018 Share Posted May 14, 2018 Hi I have a php page called "tenders-add.php" that allows the user to add a record to the "tenders" table. The first field in the table is called "ID" and this field needs to be unique. In javascript, I have validated that the field is not empty, but I need to check somehow in my php code that this field is also unique to the table. I am stuck on how to accomplish this. tenders-add.php Link to comment Share on other sites More sharing options...
justsomeguy Posted May 14, 2018 Share Posted May 14, 2018 Look up records in the database with the value you're looking for in that field. If it finds any records, then it already exists in the database. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now