MySQL / PHP Update语句输出白页,没有错误

Im trying to update records in my table with the followin, my problem is however that my browser outputs an empty white page with no source, Can anybody see what I'm doing wrong?

<?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());


?>

You have assigned a variable to your query, but you are not running it.

 $query = mysql_query("UPDATE users SET email= '$email' WHERE id='$uid'") or die(mysql_error());

So, the above is just a redundant code. to run it, you should call $query, like this

if($query){
echo 'Updated performed';
}else{
echo 'Update failed';
}

Note I'm not encouraging you to use mysql_ functions as they are weak, vulnerable and deprecated. Intead you should learn more about PDO

You are not displaying anything after DB operation. So nothing will be printed.

you can do like this:

$query = mysql_query("UPDATE users SET email= '$email' WHERE id='$uid'") or die(mysql_error());

$sql_query = mysql_query($query);

if(mysql_affected_rows()) {
    $msg = "something has changed!";
} else {
    $msg = "nothing has changed!";
}