Nuimi Posted April 16, 2015 Share Posted April 16, 2015 (edited) Can you help me with sql, I need update form, but I don´t know how can I do it. $db= new mysqli("localhost", "dany66", "*******", "mathstart"); $email_n = $_POST['email_n']; $vek_n = $_POST['vek_n']; $datum_n = $_POST['datum_n']; if(isset($email_n)) { $update1 = "UPDATE inf(email) SET email= '$email' WHERE jmeno = '" . $_SESSION['username'] . "'"; $pokus = $db -> query($update1); if(fetch_assoc($pokus) == TRUE) { echo("<script> alert('Řádek s e-mailem byl změněn.')</script>"); } } Edited April 16, 2015 by Nuimi Link to comment Share on other sites More sharing options...
Stemar Posted April 16, 2015 Share Posted April 16, 2015 (edited) I think the error might be in the name of the table. Change inf(email) for the name of the table (usually is 'users') and it should work. In case that you actually called you db inf(email): Sorry, my bad! Edited April 16, 2015 by Stemar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now