Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

The Value did not insert into the right column.

the mail() function

Moderators: macek, egami, gesf

The Value did not insert into the right column.

Postby swee » Thu Sep 23, 2004 2:22 am

Hi all,
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? :(
swee
New php-forum User
New php-forum User
 
Posts: 9
Joined: Tue Sep 21, 2004 9:42 pm

Postby swee » Thu Sep 23, 2004 2:42 am

Also, the variable type that i have put was "varchar length255" so i was thinking the comments would be longer than this. So i decided to Change it to BLOB then it makes no different, still part of my comment by the customer was cut off half way. Then, i change it to TEXT..still those STRINGS that i have changed doesn't work. Why is it so?
swee
New php-forum User
New php-forum User
 
Posts: 9
Joined: Tue Sep 21, 2004 9:42 pm


Return to PHP coding => Mail

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.