i am trying to check if an id in the database already exists and if it does not then only insert that id and not the other ones that exist
I have tried to do a where sta
You need to select the id's in your MYSQL table with the id you want to check and then count the rows. If the row count is 0 then the id doesn't exist.
$query = mysql_query("SELECT * FROM your_table WHERE id='$id'");
$count = mysql_num_rows($query);
If($count!=0){
// id exists
} else {
// id doesn't exist
}