Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions Morph - the bot/contact-bot/contact-us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title> Morph - Contact Us</title>
<style>
.contact {
background-color: #F6F6F6;
text-align: center;
margin: 80pt 200pt 50pt 200pt;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
color: black;

}
.input {
margin-right: 200pt;
width: 400pt;
margin-left: 100pt;
}
h1 {
background-color: #e0f8ea;
margin-top: -50pt;
padding-bottom: 10pt;
padding-top: 10pt;
}
button {
height: 30pt;
border-radius: 16px;
border: none;
text-decoration: none;
display: inline-block;
font-size: 20px;
font-weight: bold;
background-color: rgb(130, 245, 130);
}
h3 {
background-color: #42B883;
padding-left: 30pt;
margin-right: -20pt;
margin-left: -20pt;
padding-top: 8pt;
padding-bottom: 8pt;
color: white;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 26px;
}
ul {
list-style: none;
float:right;
padding-right: 20pt;
font-size: 20px;
overflow: hidden;
}
li a {
display: block;
color: white;
text-decoration: none;
}
li a:hover {
background-color: #42B883;
}
</style>
</head>
<body>
<h3><img src="https://res.cloudinary.com/gfellah45/image/upload/v1569591397/malebot_m3bxxc.png" alt="Morph Logo" align="middle">Morph
<span>
<ul>
<li><a href="http://morph.adeolamade.com.ng/">Home</a></li>
</ul>
</span>
</h3>
<div class = "contact">
</br></br>
<h1>Contact Us</h1>
</br></br>
<form action="contact.php" method="POST">
<p style= "padding-right: 370pt">Email</br>
<input type="email" name="email" class="input" style="height: 25pt;" placeholder="Your email" required>
<p style= "padding-right: 360pt">Subject</br>
<input type="text" name="subject" class="input" style="height: 25pt;" placeholder="Subject of message" required>
<p style= "padding-right: 355pt">Message</br>
<textarea name="message" class="input" cols="30" rows="10" placeholder="Type your complaint or suggestion" required></textarea>
<br></br>
<button type="submit" name="submit" class="input">Submit</button>
</form>
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions Morph - the bot/contact-bot/contact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
if (isset($_POST['submit'])) {
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];

$servername = "localhost";
$dbusername = "host";
$dbpassword = "";
$dbname = "morpheus_bot";

$conn = new mysqli ($servername, $dbusername, $dbpassword, $dbname);

$q = "INSERT INTO `contact-us`(`id`, `email`, `subject`, `message`) VALUES ('', '$email', '$subject', '$message')";

if (mysqli_query($conn, $q)) {
echo 'Message sent.';
header('Location: http://morph.adeolamade.com.ng/');
exit;
} else {
echo 'Please, try again.';
}
}
?>
56 changes: 46 additions & 10 deletions Morph - the bot/morpheus_bot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 26, 2019 at 04:26 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 7.2.5
-- Generation Time: Oct 06, 2019 at 01:58 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.1.32

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
Expand All @@ -24,17 +24,40 @@ SET time_zone = "+00:00";

-- --------------------------------------------------------

--
-- Table structure for table `contact-us`
--

CREATE TABLE `contact-us` (
`id` int(20) NOT NULL,
`email` varchar(20) NOT NULL,
`subject` text NOT NULL,
`message` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `contact-us`
--

INSERT INTO `contact-us` (`id`, `email`, `subject`, `message`) VALUES
(1, '', '', ''),
(2, 'enitanfanegan@gmail.', 'life mightymighty', 'float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;'),
(3, 'enitanfanegan@gmail.', 'life mightymighty', 'float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;float:right; padding-right: 20pt; font-size: 20px;'),
(4, 'enitanfanegan@gmail.', 'life mightymighty', 'mightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymightymighty');

-- --------------------------------------------------------

--
-- Table structure for table `know_base`
--

CREATE TABLE `know_base` (
`know_base_id` int(11) NOT NULL,
`ans` text,
`qtns` text,
`anto` text,
`syno` text,
`exam` text
`ans` text DEFAULT NULL,
`qtns` text DEFAULT NULL,
`anto` text DEFAULT NULL,
`syno` text DEFAULT NULL,
`exam` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
Expand All @@ -43,12 +66,19 @@ CREATE TABLE `know_base` (

INSERT INTO `know_base` (`know_base_id`, `ans`, `qtns`, `anto`, `syno`, `exam`) VALUES
(1, 'tending to talk a great deal; talkative.', 'loquacious', NULL, 'talkative,garrulous,voluble,long-winded', 'never loquacious, Sarah was now totally lost for words'),
(2, 'a person that prefers not to associate with others', 'loner', NULL, 'recluse,introvert,lone wolf,hermit,solitary,misanthrope', 'my interest in birdwatching had made me a bit of a loner');
(2, 'a person that prefers not to associate with others', 'loner', NULL, 'recluse,introvert,lone wolf,hermit,solitary,misanthrope', 'my interest in birdwatching had made me a bit of a loner'),
(3, 'EHDHHBDHBHDBHDBHDBH', 'njkfdfkkjkf', 'm,,mmmmm,m\r\nnfknffnfhnfnf', 'knnkknkjkm\r\nnkgfknkngffdnj', 'knnkkjnkbbgfgg');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `contact-us`
--
ALTER TABLE `contact-us`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `know_base`
--
Expand All @@ -59,11 +89,17 @@ ALTER TABLE `know_base`
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `contact-us`
--
ALTER TABLE `contact-us`
MODIFY `id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `know_base`
--
ALTER TABLE `know_base`
MODIFY `know_base_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
MODIFY `know_base_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
Expand Down