Hi all,
I am working on multi-page form that inserts/update data in three tables in mysql DB. So I have a table reports, and form field newreport (textarea) that can be empty. I would like to skip inserting into the table reports if this field is empty.
Here is what i have tried so far:
The form field is this:
<textarea name="newreport" id="newreport" rows="10" cols="100" ></textarea
And in the action page I have:
$newreport=$_POST['newreport'];
if(isset($newreport)){
$sqlInsert="INSERT INTO reports (agreement_id, report_txt) VALUES ('$id','$newreport')";
$insertExec=mysql_query($sqlInsert);
}
This is not working, the record is insert even if empty.
Please advise if you have some ideas.
Lily