File size: 735B
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
session_name("SESID");
session_start();
include "cfg.php";
mysql_connect ("$DB_HOST", "$DB_USER", "$DB_PASS")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("$DB_NAME");
$q = @mysql_query("select * from `users` where id='$id';");
$data = @mysql_fetch_array($q);
$link=$data['link'];
$data['out'] += 1;
$data['allout'] += 1;
@mysql_query("update `users` set out='".$data['out']."', allout='".$data['allout']."' where id='$id';");
header("Location: ".$data['link']."");
?>