Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "username";
- $password = "password";
- $host = "localhost";
- $db = $username;
- $connection = mysqli_connect($host, $username, $password, $db);
- if(isset($_POST["PSol"]))
- {
- $sql = "UPDATE table SET column = '..' WHERE id = 1";
- if ($connection->query($sql) === TRUE) {
- echo "Record updated successfully";
- mysqli_close($connection);
- echo "<p>Disconnected from server: ".$host."</p>";
- } else {
- echo "Error updating record: " . $connection->error;
- mysqli_close($connection);
- echo "<p>Disconnected from server: ".$host."</p>";
- }
- }
- }
- ?>
- <form method = "POST" name = "PSolCanvas" class = "PSolCanvas">
- <input type = "button" name = "PSol" class = "PSol" value = "P"/>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement