Hello there,
With the help of PHP and MySql I'm making a internet-form.
Within this form it should be possible for the (end)user to add values to a form-text (html).
Before the value is inserted into a table, I want to validate the value of the attributes: if it is empty, there should NOT be an insertion nto the table.
with:
if(isset($naam, $item)){
$sql = "insert into aanbod values '$naam', '$item')";
mysql_query($sql);
}
it always inserts (also if it's empty) values into the table.
How can I check that '$naam' and '$item' contain no empty strings?
a desperate swing-dancer!