Location: PHPKode > projects > PHP MySQL Address Book > addressbook/library/update.php
<html>
<head>
<title>Using PHP To Update MySQL Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<?
include 'library/config.php';
include 'library/opendb.php';

mysql_select_db('mysql') or die('Error, cannot select mysql database');
$query  = "UPDATE user SET password = PASSWORD('newpass') WHERE user = 'phpcake'";
mysql_query("SET NAMES 'utf8'");
mysql_query('SET CHARACTER SET utf8'); 
mysql_query($query) or die('Error, query failed');
include 'library/closedb.php';
?>
</body>
</html>
Return current item: PHP MySQL Address Book