PHP-Code:
<?php
include 'config.ini';
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
if (isset($_GET['id']))
{
$id=$_GET['id'];
$users=mysql_query("select * from accounts where ID='$id'");
$user=mysql_fetch_assoc($users);
$ip=$_SERVER['REMOTE_ADDR'];
$oldtime=time()-21600;
$iplocks=mysql_query("select * from ips where ip='$ip' and ip_time>'$oldtime'");
$iplock=mysql_fetch_assoc($iplocks);
if ((!empty($user)) && ($empty($iplock)))
{
mysql_query("update accounts set coin=coin+1000 where ID='$id'");
$clicktime=time();
mysql_query("insert into ips (ip,ip_time,ip_clicked_user_id) values ('$ip','$clicktime','$id')");
echo "Danke!<br>";
}
}
?>
PHP-Code:
Fatal error: Function name must be a string in /home/www/web194/html/ref.php on line 24
PHP-Code:
if ((!empty($user)) && ($empty($iplock)))
Kommentar