Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form action="gobacktopage.com">
- <input type="submit" value="Add Another" />
- </form>
- </body>
- </html>
- <?php
- $servername = "myserver.amazonaws.com";
- $username = "myusername";
- $password = "mypassword";
- $dbname = "desireddatabase";
- $verse= $_POST['verse'];
- $book= $_POST['book'];
- $reference = $_POST['reference'];
- $cleanverse = addslashes($verse);
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- if ($stmt = $conn->prepare("INSERT INTO myverses (versetext, book, reference) VALUES (?, ?, ?)")) {
- // Bind the variables to the parameter as strings.
- $stmt->bind_param("sss", $cleanverse, $book, $reference);
- // Execute the statement.
- $stmt->execute();
- // Close the prepared statement.
- $stmt->close();
- }
- $conn->close();
- ?>
Add Comment
Please, Sign In to add comment