Im i have a php form to enter data into a mysql database, my question is how do i handle duplicate records for example if an ID number already exsists how do i check if exsists
do a select like : select count(loan_id) from load where load_id=$values[loan_id]
than if result>0 don't insert and give error message "ID is already in the database" to user, otherwise insert it.