how to update date using phpmysql
- by DAFFODIL
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);
?