Im building a login for our employees and now I'm creating the validation for each input fields. If I have a table named pages and inside that table I've got a column field named title. As an example I've created a dummy title My new title.
I've created a function that let's our users create new pages, and I want to be able to check if the title already exists in our database.
For example, if the user types in My new title and submits the form, then he gets an error message with the following text: Sorry, your title already exists
I know I haven't provided much information here, but I'm from scratch on this one. I know how to check if a number is the same, or if two input field/db rows doesn't match each other. It may be an easy one, but I really can't figure it out.
I would be very grateful if you had a simple solution to this. Continue a wonderful day :)