I am only beginner in this. I don't understand all of code, most of it was given to me to work on.
I am trying to do checks on MySQL on workshift table. There is dayshift, eveningshift and nightshift (Other two fields are shiftid, name and date). They are drop down box with y for yes and n for no. They are allowed to work ONE workshift a time. They are NOT allowed to do more than 1 workshift. When inserting data using form from PHP, if I picked y for dayshift and eveningshift, it shouldn't allow me do that maybe pop up box say its not allowed or something.
I don't know how to do that sort of checks.
//$query = "SELECT name,owner,species,sex,birth FROM pet WHERE name!='fluffy' ORDER BY name";
$header = "WORK SHIFTS";
$table = "workshift";
$query = "SELECT * FROM ".$table." ORDER BY DATE ASC";
$query = "SELECT * FROM ".$table." WHERE 'n' NOT IN (DAYSHIFT, EVENINGSHIFT, NIGHTSHIFT)";
Can you help me soon please?