How would you go about inserting multiple rows into a db if certain fields contained data? Consider the following:
register_case = mysql_query ("INSERT INTO cases VALUES ('$case','$p_firstname','$p_lastname','$city'),('$case','$p2_firstname','$p2_lastname','$city'),('$case','$p3_firstname','$p3_lastname','$city')");
This creates multiple rows with different first and last names but the case and city remain the same. However, in the event that there is only 1 entry, a row is still created for the other 2. How is it possible to create a row only if there is data present in a given field?