Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'db.php';
- $id = $_POST['id'];
- $name = $_POST['name'];
- $email = $_POST['email'];
- $sql = "UPDATE users SET name='$name', email='$email' WHERE id=$id";
- if ($conn->query($sql) === TRUE) {
- echo "Record updated successfully";
- } else {
- echo "Error updating record: " . $conn->error;
- }
- $conn->close();
- header("Location: index.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement