mercredi 2 décembre 2020

Sent email bu URL parameters

I have a contact form on my website and i want to send an email to my personal inbox the contact information when user gives. But i want to create a php file and i will set some parameters to the URL of this file (like name,email or message) and i will sent the email with the value of the parameters.

Note: I know how to send the email from my webhost so i don't need help with the email sent.

(sorry for my bad english :-( )

here is my contact form code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/style.css">
    <title>Contact with me</title>
</head>
<body>
    <nav>
        <div class="logo">
          <h3>George Sepetadelis</h3>
        </div>
        <ul class="nav_links">
      <li>
        <a class="home"><b>Home</b></a>
      </li>
      <li>
        <a class="project"><b>Projects</b></a>
      </li>
      <li>
        <a class="aboutme"><b>About me</b></a>
      </li>
      <li>
        <a  style="color: cadetblue;" class="contact"><b>Contact</b></a>
      </li>
    </ul>
  </nav>
  <center>
    <h1 class="contact-title">Contact with me</h1>
    <br><br>
    <div class="form-div">
        <form action="#" method="POST">
            <h2 style="color:darkcyan; font-family: 'Poppins', sans-serif;"><b>Contact form</b></h2>
            <br><br>
            <input type="text" name="name" id="name" placeholder="Your full name" autocomplete="off" required>
            <br><br>
            <input type="email" name="email" id="email" placeholder="Your email" autocomplete="off" required>
            <br><br>
            <input type="text" name="message" id="message" placeholder="Type here what you want exactly..." required>
            <br><br><br>
            <p style="font-family: 'Poppins', sans-serif;">Contact reason:</p><br>
            <div class="reason-div" style="text-align: left; width: 120px; ">
                <input type="radio" id="mobile-app" name="reason" value="mobile app">
                <label for="mobile-app">Mobile-app</label><br>
                <input type="radio" id="web-app" name="reason" value="web-app">
                <label for="web-app">Web-app</label><br>
                <input type="radio" id="desktop-app" name="reason" value="desktop-app">
                <label for="desktop-app">Desktop-app</label><br>
                <input type="radio" id="other" name="reason" value="other">
                <label for="other">Other</label>
            </div>
            <br><br>
            <button class="submit-contact-form" type="submit"><b>Send contact form </b></button>
            <br><br>
        </form>
    </div>
  </center>
  <script src="js/main.js"></script>



Aucun commentaire:

Enregistrer un commentaire