Location: PHPKode > projects > PHP SQL tools > prfile/swap_messages_view.php
<?
include("identify.php");
load_all("swap_messages_view",1,1);

if ($main_user->setting_show_messages <> 1) {
	$main_user->setting_show_messages = 1;
} else {
	$main_user->setting_show_messages = 0;
}

$table_name = "users";

$sql = "UPDATE $table_name
	SET
	setting_show_messages = \"$main_user->setting_show_messages\"	
	WHERE id = \"$main_user->id\"
";

$result = @mysql_query($sql, $main_settings->connection) or die("Couldn't execute query.");

header ("Location: user.php?user_id=$main_user->id");
?>
Return current item: PHP SQL tools