Thursday, 15 August 2013

can someone help me with this contact validation form?

can someone help me with this contact validation form?

ok i need to make this contact form highlight red and say not valid inside
the boxes! what ever i do i cant get it to work! i cant change the html
tags that are already there you can add to the html but not delete any of
it but i want it to display on the same page with javascript and have it
look very nice can someone edit what i have and help me make this work
please!
here is there html
<!-- Contact -->
<div class="wrapper wrapper-style4">
<article id="contact">
<header>
<h2>Want to hire me? Get in touch!</h2>
<span>I do quality work and would love to work for
you!.</span>
</header>
<div>
<div class="row">
<div class="12u">
<div id="errors"></div>
<form method='post' action='mailform.php'
id='contact-form'>
<div>
<div class="row half">
<div class="6u">
<input type="text" name="name"
id="name" placeholder="Name"
/>
</div>
<div class="6u">
<input type="text"
name="email" id="email"
placeholder="Email" />
</div>
</div>
<div class="row half">
<div class="12u">
<input type="text"
name="subject" id="subject"
placeholder="Subject" />
</div>
</div>
<div class="row half">
<div class="12u">
<textarea name="message"
id="message"
placeholder="Message"></textarea>
</div>
</div>
<div class="row">
<div class="12u">
<a href="#" class="button
form-button-submit">Send
Message</a>
<a href="#" class="button
button-alt
form-button-reset">Clear
Form</a>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- Contact -->
<div class="wrapper wrapper-style4">
<article id="contact">
<header>
<h2>Want to hire me? Get in touch!</h2>
<span>I do quality work and would love to work for
you!.</span>
</header>
<div>
<div class="row">
<div class="12u">
<div id="errors"></div>
<form method='post' action='mailform.php'
id='contact-form'>
<div>
<div class="row half">
<div class="6u">
<input type="text" name="name"
id="name" placeholder="Name"
/>
</div>
<div class="6u">
<input type="text"
name="email" id="email"
placeholder="Email" />
</div>
</div>
<div class="row half">
<div class="12u">
<input type="text"
name="subject" id="subject"
placeholder="Subject" />
</div>
</div>
<div class="row half">
<div class="12u">
<textarea name="message"
id="message"
placeholder="Message"></textarea>
</div>
</div>
<div class="row">
<div class="12u">
<a href="#" class="button
form-button-submit">Send
Message</a>
<a href="#" class="button
button-alt
form-button-reset">Clear
Form</a>
</div>
</div>
</div>
</form>
</div>
</div>
i need the java script here
<script>
</script>
and the php form is here
<?php
$to = "bcw1995@gmail.com";
$subject = $_REQUEST['subject'];
$message = $_REQUEST['message'];
$from = $_REQUEST['email'];
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail($_REQUEST['email'], $subject,
$message, "From:" . $email);
}
header("Location: http://www.thorbis.com/#contact");
?>
can someone please fix this you will be a life saver!

No comments:

Post a Comment