php stop passing null values tp mysql

i am using following code to add values\[code\]$debdes = $_POST['debdes'];$debamt = $_POST['debamt'];$crdes = $_POST['crdes'];$cramt = $_POST['cramt'];$date = $_POST['date'];include_once ("db.php");$ucbook = "INSERT INTO cbook(debdes,debamt,crdes,cramt,date) VALUES ('$debdes','$debamt','$crdes','$cramt','$date');";\[/code\]now i want that if "debamt" is filled "debdes" should not be empty and like this if "cramt" is filled then "crdes" should not be empty while pressing submit button so if some one press submit button it displays a message that say fill "debdes" first.
 
Back
Top