0

For some reason I can not figure out why this is not posting anything to my PHP. I commented out all of the PHP except the name just to see if it even works with just that one. Thanks for the help.

<form action="mail.php" method="post" class="form" id="project_form" style="display: block;">
        <div id="name_input"><img src="images/icon_form_name.png" title="Name" alt="Name" width="25"><input name="name" type="text" class="field" required placeholder="Full Name *"></div>
        <div id="email_input"><img src="images/icon_form_email.png" title="Email" alt="Email" width="25"><input name="email" type="email" class="field" required placeholder="email@domain.com *"></div>
        <div id="phone_number_input"><img src="images/icon_form_phone.png" title="Phone Number" alt="Phone Number" width="20"><input name="phone" type="tel" class="field" required placeholder="123-456-7890"></div>
        <div id="website_input"><img src="images/icon_form_website.png" title="Website" alt="Website" width="25"><input name="website" type="text" title="www.mywebsite.com" class="field" placeholder="www.mywebsite.com"></div>
        <div id="budget_input_text"><p>Do you have a budget?<br><span style="font-size: 12px;">You can leave this blank if you don’t know.</span></p></div>
        <div id="budget_input"><img src="images/icon_form_budget.png" title="Budget" alt="Budget" width="25"><input name="budget" type="text" class="line_field" placeholder="$" style="-webkit-appearance: none;"></div>
        <div id="referral_input_text"><p>How did you hear about us?<br><span style="font-size: 12px;">Friend, social media, Google, etc.</span></p></div>
        <div id="referral_input"><img src="images/icon_form_comment.png" title="Referral" alt="Referral" width="25"><input name="referral" type="text" class="line_field"></div>
        <div id="comment_input"><textarea name="comment" class="field" id="comment" required placeholder="How can we help? Tell us about your project and what you are trying to accomplish. Details and timelines are always appreciated.*"></textarea></div>
        <div id="button_input"><input type="submit" name="submit" value="Submit your project" id="button"></div>
        <p style="color: rgba(255,255,255,.50); text-align: center; margin: 10px 0 0 0; padding: 0;">*Required</p>
    </form>

<?php
if (isset($_POST['submit'])) {
    $name = $_POST['name'];
    /*$email = $_POST["email"];
    $phone = $_POST["phone"];
    $website = $_POST["website"];
    $budget = $_POST["budget"];
    $referral = $_POST["referral"];
    $comment = $_POST["comment"]; 
    $to = "email@domain.com"; 
    $subject = "Hello";
    $from = "From: $name";

    $body=
    "$subject\
    ";
    "$email\
    ";
    "$phone\
    ";
    "$website\
    ";
    "$budget\
    ";
    "$referral\
    ";
    "$comment\
    ";

    mail($to, $from, $body);*/

    echo $name;
}
?>
GioG7
  • 1
  • 1

0 Answers0