I have created a new Testimonial Page. Then i tried testing it myself by filling up the testimonial page, and submit as follow. Then, i went to check up with my Database (phpMyadmin2.3.2), it did not insert the values into the correct column. That is the first problem. The 2nd problem i have met that is, the value in the radio box i have checked appears as blank in the database column. Why is it so!?
This is the code i have written for my Testimonial page in (PHP):
- Code: Select all
if(isset($_POST['mailing2'])){
$query="SELECT * from Customer WHERE CustEmail='".$_POST['email']."';";
$result=safe_query($query);
if(!(mysql_num_rows($result))){
$query="INSERT INTO Customer(eid,CustName,CustCountry,CustTailor,CustEmail,regDate,
Custrecomm,Custcomment)
VALUES('','".$_POST['name']."','".$_POST['country']."','".$_POST['field']."','".$_POST['email']."',now(),'".$_POST['recommendation']."','".$_POST['commentbox']."');";
safe_query($query);
Someone please tell me what went wrong?


