Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Mladi Metalac</title>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" href="index.css">
- </head>
- <body>
- <div id="wrapper">
- <div id="topBar">
- <div id="logoid">
- MLADI<span class="logospan">METALAC</span>
- </div>
- <nav>
- <ul>
- <li><a href="index.html">POČETNA</a></li>
- <li><a href="about.html">O NAMA</a></li>
- <li class="active"><a href="contact.html">KONTAKT</a></li>
- </ul>
- </nav>
- </div>
- <header>
- <center><img src="images/header1.png" /></center>
- </header>
- <div class="wrapper">
- <div id="main" style="padding:5px 0 50px 0;">
- <h3>Kontaktirajte nas</h3>
- <h4>Popunite formu ispod, i mi ćemo vam se javiti u roku od 24 sata.</h4>
- <!-- Form -->
- <form id="contact-form" action="contact.php" method="post">
- <div>
- <label>
- <span>Ime: (obavezno)</span>
- <input placeholder="Unesite vaše ime" name="name" type="text" required autofocus>
- </label>
- </div>
- <div>
- <label>
- <span>Email: (obavezno)</span>
- <input placeholder="Unesite vašu email adresu" name="email" type="text" required>
- </label>
- </div>
- <div>
- <label>
- <span>Website: (obavezno)</span>
- <input placeholder="Počnite sa http://" name="website" type="url" required>
- </label>
- </div>
- <div>
- <label>
- <span>Poruka: (obavezno)</span>
- <textarea placeholder="Napišite Vašu poruku" name="message" required></textarea>
- </label>
- </div>
- <div>
- <button name="submit" type="submit" id="contact-submit">Pošalji Email</button>
- </div>
- </form>
- <!-- /Form -->
- </div>
- </div>
- <footer id="theFooter">
- <div class="column">
- <h3>Kontaktirajte nas</h3>
- <p>
- Adresa<br />
- 71240, Hadžići<br />
- Sarajevo, Bosna i Hercegovina<br />
- +387 61 55 22 82<br />
- mladimetalac@live.com
- </p>
- </div>
- <div class="column">
- <h3 style="margin-bottom: 50px;">Potražite nas</h3>
- <ul>
- <li><a href="https://www.facebook.com/mladimetalac"><img src="images/facebook.png" /></a></li>
- <li><a href="#"><img src="images/twitter.png" /></a></li>
- <li><a href="https://plus.google.com/109990636859124733766"><img src="images/googleplus.png" /></a></li>
- <li><a href="https://www.youtube.com/user/Mladimetalac"><img src="images/youtube.png" /></a></li>
- </ul>
- </div>
- <div class="column">
- <img src="images/render.png" />
- </div>
- </footer>
- </section>
- <p style="text-align: center;">Copyright 2016. © Website powered by <a href="benjo.html">Benjamin Fajić</a></p>
- </div>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
- <script type="text/javascript" src="script.js"></script>
- //PHP Script
- <?php
- require 'PHPMailerAutoload.php';
- if(isset($_POST['send']))
- {
- // Fetching data that is entered by the user
- $email = $_POST['email'];
- $password = $_POST['password'];
- $to_id = $_POST['toid'];
- $message = $_POST['message'];
- $subject = $_POST['subject'];
- // Configuring SMTP server settings
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = 587;
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->Username = $email;
- $mail->Password = $password;
- // Email Sending Details
- $mail->addAddress($to_id);
- $mail->Subject = $subject;
- $mail->msgHTML($message);
- // Success or Failure
- if (!$mail->send()) {
- $error = "Mailer Error: " . $mail->ErrorInfo;
- echo '<p id="para">'.$error.'</p>';
- }
- else {
- echo '<p id="para">Message sent!</p>';
- }
- }
- else{
- echo '<p id="para">Please enter valid data</p>';
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement