Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function UpdateTable()
- {
- global $connection;
- $username = $_POST['username'];
- $password = $_POST['password'];
- $id = $_POST['id'];
- $query = "UPDATE users SET "; // username is the name of the column in the database, you need the space in between
- $query.="username = '$username' , ";
- $query.= "password = '$password' ";
- $query.= "WHERE id = $id ";
- $result = mysqli_query($connection,$query);
- if(!$result)
- {
- die("Query failed". mysqli_error($connection));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement