Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $username = "root";
- $password = "ascent";
- $database = "characters";
- $oldCharacter = $_POST['oldCharacter'];
- $newCharacter = $_POST['newCharacter'];
- $con = new mysqli($host, $username, $password, $database);
- $sql = "UPDATE character_inventory SET guid = ? WHERE guid = ?";
- $stmt = $con->prepare($sql);
- $stmt->bind_param('ii',$newCharacter,$oldCharacter);
- $stmt->execute();
- if ($stmt->execute()) {
- // it worked
- $stmt->close();
- } else {
- // it didn't
- die('error: ' . mysqli_error($con));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement