The simple examples of how to update Data in a Database is
<?php
$Host = "localhost";
$User = "root";
$Pass = "";
$Name = "your databaseName";
$con = mysql_connect($Host, $User, $Pass);
$db = mysql_select_db($database_name, $con);
$sql = "UPDATE `table_name` SET `name` = 'Youname', `email` = 'emailid' WHERE `id` = '2';
$result = mysql_query($sql);
?>
<?php
$Host = "localhost";
$User = "root";
$Pass = "";
$Name = "your databaseName";
$con = mysql_connect($Host, $User, $Pass);
$db = mysql_select_db($database_name, $con);
$sql = "UPDATE `table_name` SET `name` = 'Youname', `email` = 'emailid' WHERE `id` = '2';
$result = mysql_query($sql);
?>
No comments:
Post a Comment