how to update date using phpmysql
Posted
by DAFFODIL
on Stack Overflow
See other posts from Stack Overflow
or by DAFFODIL
Published on 2010-04-02T06:51:45Z
Indexed on
2010/04/02
6:53 UTC
Read the original article
Hit count: 235
php
This is how,i insert data into db,but now,i want a particular column to update,how do i do?
$con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db("form", $con);
$sql="INSERT INTO Customer (Name, Address, City, Pincode, State, Country, Phone, Mobile, Fax, Email, Website, Notes) VALUES ('$_POST[name]','$_POST[address]','$_POST[city]','$_POST[pincode]','$_POST[state]','$_POST[country]','$_POST[phone]','$_POST[mobile]','$_POST[fax]','$_POST[email]','$_POST[url]','$_POST[notes]')";
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added";
mysql_close($con);
?>
© Stack Overflow or respective owner