Kod
Something is wrong in your syntax obok '' WHERE login = 'admin' ' AND pass = 'root' ' w linii 1
a tu skrypt:
<?php include "conn.php"; ?> <html> <head> <title>Edycja danych</title> </head> <body> <?php $query_update = "UPDATE user_info SET " . "pass = '" . $_POST['pass'] . "', " . "gg = '" . $_POST['gg'] . "', " . "imie = '" . $_POST['imie'] . "', " . "nazwisko = '" . $_POST['nazwisko'] . "', " . "wiek = '" . $_POST['wiek'] . "', " . "osobie = '" . $_POST['osobie'] . "', " . "rower = '" . $_POST['rower'] . "', " . "miasto = '" . $_POST['miasto'] . "', " . "' WHERE login = '" . $_SESSION['user_logged'] . "' " . "' AND pass = '" . $_SESSION['user_password'] . "' "; $query = "SELECT * FROM user_info " . "WHERE login = '" . $_SESSION['user_logged'] . "' " . "AND pass = '" . $_SESSION['user_password'] . "' "; ?> <form action="edit.php" method="post"> Hasło*: <input type="password" name="pass" Adres email*: <input type="text" name="email" Numer gadu-gadu: <input type="text" name="gg" Imię: <input type="text" name="imie" Nazwisko: <input type="text" name="nazwisko" Data urodzin (RRRR-MM-DD): <input type="text" name="wiek" Miasto: <input type="text" name="miasto" O sobie: <textarea id="osobie" name="osobie" rows="10" cols="60"> Rower: <input type="text" name="rower" </select><br><br> <input type="submit" name="submit" value="Uaktualnij"> <input type="button" value="Anuluj" onclick="history.go(-1);"> </form> <?php }else { $query = "SELECT * FROM user_info " . "WHERE login = '" . $_SESSION['user_logged']. "' " . "AND pass = '" . $_SESSION['user_password'] . "';"; ?> <form action="edit.php" method="post"> Hasło*: <input type="password" name="pass" Adres email*: <input type="text" name="email" Numer gadu-gadu: <input type="text" name="gg" Imię: <input type="text" name="imie" Nazwisko: <input type="text" name="nazwisko" Data urodzin (RRRR-MM-DD): <input type="text" name="wiek" Miasto: <input type="text" name="miasto" O sobie: <textarea id="osobie" name="osobie" rows="10" cols="60"> Rower: <input type="text" name="rower" </select><br><br> <input type="submit" name="submit" value="Uaktualnij"> <input type="button" value="Anuluj" onclick="history.go(-1);"> </form> <?php } ?> </body> </html>