Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "webdmena_wp225";
- $password = "6lS]p92J!4";
- $dbname = "webdmena_wp225";
- @$text = $_POST['message'];
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Database is Sleeping <br/>");
- }
- if($text != null)
- {
- $sql = "INSERT INTO oremare (messages) VALUES (\"$text\")";
- if ($conn->query($sql) === TRUE)
- {
- echo "<h4 class=\"center\">Message Delivered Successfully! <a href=\"index.html\">Send Another</a></h4>";
- }
- } else {
- echo "<h4 class=\"center\">You must enter a valid data! <a href=\"index.html\">Retry</a></h4>";
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement