I can not understand what is happening error ... The code itself:
$ip=$_SERVER['REMOTE_ADDR']; $id = $_GET['id']; if(isset($id)) { $result = mysql_query ("INSERT INTO rate (id, from, action) VALUES ('$id','$ip','+1')"); if ($result === true) { $text = "Рейтинг истории успешно повышен"; } else { $text = "Ошибка!"; } } else { $text = "Отсутсвует ID"; }
Displays error
Mistake!
So the problem is in the sql query? There seems to be all right, the table is there, there are columns, it is connected to the database. The id itself accepts.
The very request of the form domen.loc / file.php? Id = idnum