simjay
10-05-2005, 10:03 PM
Hey
I have a form to add data to my database. How can i get it to echo an error if "nameof" and "why" are not filled in?
<?php
$sql = "INSERT INTO adddb (nameof,why,userip) VALUES ('$nameof','$why','$userip')";
$result= mysql_query($sql, $conn) or die(mysql_error());
?>
thanks
I have a form to add data to my database. How can i get it to echo an error if "nameof" and "why" are not filled in?
<?php
$sql = "INSERT INTO adddb (nameof,why,userip) VALUES ('$nameof','$why','$userip')";
$result= mysql_query($sql, $conn) or die(mysql_error());
?>
thanks