Mam problem ze skryptem który właśnie piszę. Ma za zadanie aktualizować dane w tabeli "Users" po zmodyfikowaniu ich za pomocą formularza. Inne skrypty modyfikujące dane w tej samej tabeli działają poprawnie.
Oto kod tego skryptu:
<?php
include('admin/config.php');
$row = mysql_fetch_row($_GET['id']);
$id = $_GET['id'];
$name = $_GET['name'];
$surname = $_GET['surname'];
$phone_number = $_GET['phone_number'];
$email = $_GET['email'];
$login = $_GET['login'];
$haslo = $_GET['haslo'];
$id_group = $_GET['id_group'];
$names = $_POST['name'];
$surnames = $_POST['surname'];
$phone_numbers = $_POST['phone_number'];
$emails = $_POST['email'];
$logins = $_POST['login'];
$haslos = $_POST['haslo'];
$id_groups = $_POST['id_group'];
echo '<form method="post" action="mpusersedit.php">';
echo '<label>Imię:</label><input type="text" name="name" value="'.$name.'"></input>';
echo '<label>Nazwisko:</label><input type="text" name="surname" value="'.$surname.'"></input>';
echo '<label>Numer telefonu:</label><input type="text" name="phone_number" value="'.$phone_number.'"></input>';
echo '<label>Email:</label><input type="text" name="email" value="'.$email.'"></input>';
echo '<label>Login:</label><input type="text" name="login" value="'.$login.'"></input>';
echo '<label>Hasło:</label><input type="text" name="haslo" value="'.$haslo.'"></input>';
echo '<label>Grupa użytkowników:</label><input type="text" name="id_group" value="'.$id_group.'"></input>';
echo '<input type="submit" value="Aktualizuj"/>';
echo '</form>';
echo $names;
$query = mysql_query("UPDATE Users SET name='$names', surname='$surnames', phone_number='$phone_numbers', email='$emails', login='$logins', haslo='$haslos', id_group='$id_groups', WHERE id =$id");
?>