复制代码 代码如下:
Edit
include("db.php");
$sql=mysql_query("select email from users where user_id='1'");
$row=mysql_fetch_array($sql);
$profile=$row['email'];
?>
update_profile_ajax.php
复制代码 代码如下:
if($_POST['data'])
{
$data=$_POST['data'];
$data = mysql_escape_String($data);
$sql = "update users set email='$data' where user_id='1'";
mysql_query( $sql);
}
?>