Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <div class="center">
- <?php
- /* CONNECTION */
- $database_connection = new StdClass();
- /** MySQL hostname */
- $database_connection->server = '829.23.12.123';
- /** MySQL database username */
- $database_connection->username = 'something_usr';
- /** MySQL database password */
- $database_connection->password = 'KJGAout7L';
- /** The name of the database */
- $database_connection->name = 'database_content';
- /* ESTABLISHING THE CONNECTION */
- $database = new mysqli($database_connection->server, $database_connection->username, $database_connection->password, $database_connection->name);
- if($database->connect_error) {
- echo 'connection failed';
- }
- $stmt = $database->prepare("INSERT INTO Email_Subs (email) VALUES (?)");
- $stmt->bind_param("s", $_POST[email]);
- $stmt->execute();
- $stmt->close();
- echo "<div class='jumbotron text-xs-center bg-white'>";
- echo "<h1 class='display-3'>Thank you, you have successfully subscribed!</h1>";
- echo "<p class='lead'>You will be the first to hear about news, events, exclusive stories, and more!</p>";
- echo "<p class='lead'>";
- echo "<a class='btn btn-primary btn-sm' href='index'>Return to Home</a>";
- echo "</p>";
- echo "</div>";
- $database->close();
- ?>
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement