simpel contactformulier
<form id="contact-form" method="post" class="main-contacts">
<fieldset>
<input type="hidden" name="owner_email" id="owner_email" value="[email protected]" />
<input type="hidden" name="serverProcessorType" id="serverProcessorType" value="php" />
<input type="hidden" name="smtpMailServer" id="smtpMailServer" value="localhost" />
<input type="hidden" name="stripHTML" id="stripHTML" value="true" />
<div class="rowElem">
<input type="text" name="Enter Your Name" id="name" value="Enter Your Name" onFocus="if(this.value=='Enter Your Name'){this.value=''}" onBlur="if(this.value==''){this.value='Enter Your Name'}" />
<label class="error" for="name" id="name_error">*This field is required.</label>
<label class="error" for="name" id="name_error2">*This is not a valid name.</label>
</div>
<div class="rowElem">
<input type="text" name="email" id="email" value="Enter Your E-mail" onFocus="if(this.value=='Enter Your E-mail'){this.value=''}" onBlur="if(this.value==''){this.value='Enter Your E-mail'}" />
<label class="error" for="email" id="email_error">*This field is required.</label>
<label class="error" for="email" id="email_error2">*This is not a valid email address.</label>
</div>
<div class="rowElem">
<input type="text" name="phone" id="phone" value="Enter Your Phone" onFocus="if(this.value=='Enter Your Phone'){this.value=''}" onBlur="if(this.value==''){this.value='Enter Your Phone'}" />
<label class="error" for="phone" id="phone_error">*This field is required.</label>
<label class="error" for="phone" id="phone_error2">*This is not a valid phone number.</label>
</div>
<div class="textarea-box">
<textarea onFocus="if(this.value=='Enter Your Message'){this.value=''}" onBlur="if(this.value==''){this.value='Enter Your Message'}" name="message" id="message">Enter Your Message</textarea>
<label class="error" for="message" id="message_error">*This field is required.</label>
<label class="error" for="message" id="message_error2">*The message is too short.</label>
</div>
<div class="link8">
<a href="#" id="clear">Reset</a><a href="#" id="submit">Submit</a>
</div>
</fieldset>
</form>
Welke php code moet ik hieraan toevoegen om dit formulier te doen werken zodat het een mail stuurt naar mijn emailadres?
Alvast bedankt!
Code (php)
Gewijzigd op 25/08/2012 23:33:55 door - Ariën -
Code (php)
als je het zo doet kan je je formulier ook weer laten geven als er een fout is geef je gewoon $error een 1