Hallo,
habe mir ein Theme auf Themeforest geholt. Das erste mal nun mit HTML und PHP und alles funktioniert außer das Kontaktformular. Der Themeentwickler braucht 2 Tage für ne Antwort und wirklich hilfreich sind diese auch nicht, deshalb hoffe ich, dass ich hier richtig bin.
An den beiden Datein wurde nichts verändert. Sobald alles eingetragen wurde, bekomme ich auch eine Email, jedoch wird bei mir dann nur folgendes angezeigt
Here is what was sent:
contact_name:
contact_email:
contact_url:
contact_phone:
monthly_badget:
learn_seowave:
interested_in:
addInfos:
Hier ist mal der Code der beiden Dateien
Und das ist die process Datei
Vielen Dank schonmal im Vorraus
habe mir ein Theme auf Themeforest geholt. Das erste mal nun mit HTML und PHP und alles funktioniert außer das Kontaktformular. Der Themeentwickler braucht 2 Tage für ne Antwort und wirklich hilfreich sind diese auch nicht, deshalb hoffe ich, dass ich hier richtig bin.
An den beiden Datein wurde nichts verändert. Sobald alles eingetragen wurde, bekomme ich auch eine Email, jedoch wird bei mir dann nur folgendes angezeigt
Here is what was sent:
contact_name:
contact_email:
contact_url:
contact_phone:
monthly_badget:
learn_seowave:
interested_in:
addInfos:
Hier ist mal der Code der beiden Dateien
HTML-Code:
<section class="row"> <div class="page_contact row m0"> <div class="row contact_form m0 contentRow"> <div class="container"> <div class="row"> <div class="row m0 title_row"> <h2>Let's Talk Business</h2> <h5>Tell us about your project ideas or <span>just say hello.</span></h5> </div> <div class="formArea row m0"> <form action="contact_process.php" class="row m0 contact_form" id="contactForm"> <div class="col-sm-6"> <div class="row m0"> <label for="contact_name">Name <span>*</span></label> <input type="text" class="form-control" name="contact_name" id="contact_name" required> </div> <div class="row m0"> <label for="contact_phone">Phone</label> <input type="tel" class="form-control" name="contact_phone" id="contact_phone"> </div> <div class="row m0"> <label for="monthly_badget">Monthly Budget</label> <select name="monthly_badget" id="monthly_badget" class="selectpicker form-control"> <option value="0" disabled selected>-(Monthly Budget)-</option> <option value="200">200 USD</option> <option value="300">300 USD</option> <option value="400">400 USD</option> <option value="500">500 USD</option> </select> </div> </div> <div class="col-sm-6"> <div class="row m0"> <label for="contact_email">Email <span>*</span></label> <input type="email" class="form-control" name="contact_email" id="contact_email" required> </div> <div class="row m0"> <label for="contact_url">Website <span>*</span></label> <input type="url" class="form-control" name="contact_url" id="contact_url" required> </div> <div class="row m0"> <label for="learn_seowave">How did you learn about SEOWAVE</label> <select name="learn_seowave" id="learn_seowave" class="selectpicker form-control"> <option value="0" disabled selected>-(Select)-</option> <option value="google">Google Search</option> <option value="yahoo">Yahoo Search</option> <option value="blog">Blog</option> <option value="forum">Forum</option> </select> </div> </div> <div class="col-sm-12"> <div class="row m0"> <label for="interested_in">Which services are you interested in?</label> <select name="interested_in" id="interested_in" class="selectpicker form-control"> <option value="off_page">Off Page Optimization</option> <option value="on_page">On Page Optimization</option> </select> </div> </div> <div class="col-sm-12"> <div class="row m0"> <label for="addInfos">Additional Information</label> <textarea name="addInfos" id="addInfos" class="form-control"></textarea> </div> </div> <div class="col-sm-12 text-center"> <button class="borderred_link" type="submit"><span>submit details!</span></button> </div> </form> <div id="success"> <span class="green textcenter"> Your message was sent successfully! I will be in touch as soon as I can. </span> </div> <div id="error"> <span> Something went wrong, try refreshing and submitting the form again. </span> </div> </div> </div> </div> </div> <!--Contact Form-->
PHP-Code:
<?php
$to = "nasir.rubel99@gmail.com";
$from = $_REQUEST['contact_email'];
$name = $_REQUEST['contact_name'];
$headers = "From: $from";
$subject = "You have a message from your Estate Pro.";
$fields = array();
$fields{"name"} = "contact_name";
$fields{"email"} = "contact_email";
$fields{"url"} = "contact_url";
$fields{"phone"} = "contact_phone";
$fields{"Monthly Budget"} = "monthly_badget";
$fields{"How know about SEOWAVE"} = "learn_seowave";
$fields{"Interested In"} = "interested_in";
$fields{"Additional Information"} = "addInfos";
$body = "Here is what was sent:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
?>
Vielen Dank schonmal im Vorraus
Kommentar