I searched for similar questions without success.
I have this piece of code:
form1.php
$query = "INSERT INTO table1 "; $query .= "(fname, lname, mail)"; $query .= " VALUES "; $query .= "('".$_POST[fname]."', '".$_POST[lname]."', '".$_POST[mail]."')"; $result = mysql_query($query) or die ("Query Failed: " . mysql_error());
And I want the script to check if a value is inserted in the corresponding column, and throw an error if that happens. any ideas?
source share