Hello,
How would I go about adding information in a text if a user puts text in it, but not having it entered if the textbox is blank. I have tried..
if($textbox1){
$sql = "INSERT INTO table(user_id,value1) VALUES '$user_id','$value1')";
$result=mysql_query($sql);
return true;
} else {
return false;
}
This just errors. I have 5 text box, some people will enter 1 of them, some 2, some all etc.
Many Thanks
Ben
How would I go about adding information in a text if a user puts text in it, but not having it entered if the textbox is blank. I have tried..
if($textbox1){
$sql = "INSERT INTO table(user_id,value1) VALUES '$user_id','$value1')";
$result=mysql_query($sql);
return true;
} else {
return false;
}
This just errors. I have 5 text box, some people will enter 1 of them, some 2, some all etc.
Many Thanks
Ben