我试图用以下内容更新我的表中的记录,但是我的问题是我的浏览器输出一个没有源的空白页面,有人能看到我做错了什么吗?
<?php
require 'dbconfig.php';
//Always place this code at the top of the Page
session_start();
if (!isset($_SESSION['id'])) {
// Redirection to login page twitter or facebook
header("location: index.php");
}
function safe($value){
return mysql_real_escape_string($value);
}
// Variables
$_SESSION['username'];
$_SESSION['oauth_provider'];
$uid = $_SESSION['id'];
$email = safe($_POST["email"]);
$credits = safe($_POST["credits"]);
$query = mysql_query("UPDATE users SET email= '$email' WHERE id='$uid'") or die(mysql_error());
?>