Reputation: 1179
I use a template to develop a website. There is a contact form in it which I am having trouble to use. I tried using sources finding from internet to set it to send email to address I want but to no avail.
Here is source for contact form page.
<form id="ContactForm">
<div>
<div class="wrapper"> <span>Your Name:</span>
<input type="text" class="input" />
</div>
<div class="wrapper"> <span>Your E-mail:</span>
<input type="text" class="input" />
</div>
<div class="textarea_box"> <span>Your Message:</span>
<textarea name="textarea" cols="1" rows="1"></textarea>
</div>
<a href="#" class="button1"
onClick="document.getElementById('ContactForm').submit()">Send</a>
<a href="#" class="button1"
onClick="document.getElementById('ContactForm').reset()">Clear</a>
</div>
</form>
Upvotes: 0
Views: 422
Reputation: 10120
php require names for each form element to pass variables correctly, so you need to put a name tag in each input like
<input type="text" name="name" id="id" />
second you need to define the form action, if you are sending parameters to another php file then you need to put the php file source like this:
<form id="ContactForm" method="post" action="path/to/php">
if your are sending the parameters to the same page you can replace pat/to/php with <?php $_SERVER["PHP_SELF"] ?>
or simply type in the page's name.
Upvotes: 1