tags:

views:

65

answers:

1

Is it possible not to update mysql data if one of the textbox in an html form which will update the mysql data is empty?

+1  A: 
if (!empty($_POST['nameOfTheTextBox'])) {
    // do sql update query
} else {
    echo "you need to enter a text";
}

Also as the comment to your question proposes I would strongly recommend to read about form validation/sanitizing

harpax