lcot
10-03-2010, 07:40 PM
Hello, I have a contact form here... http://livingfortodayband.co.uk/basement2/contact.php
This is just a simple form with no validation or spam protection. It just works. I have chosen to start simple and work up as I am no expert in php, I don't know a lot to be fair...
My next step is validation of the form fields but honestly I don't know where to start. I have followed a few tutorials and they have not worked so I was wondering if there is someone who would be willing to assist me in working this code out.
The style I am going for is like this... http://junglejap.com/FormTest/
I have found this page but I am not sure how to implement the code into my page... http://bassistance.de/jquery-plugins/jquery-plugin-validation/
here is the form on the php page I am working in html:
<form method="post" action="contact.php" id="contactform">
<ol>
<li>
<label for="name">First Name <span class="required">*</span></label>
<input id="name" name="name" class="text">
</li>
<li>
<label for="email">Your email <span class="required">*</span></label>
<input id="email" name="email" class="text" />
</li>
<li>
<label for="artist">Band/Artist Name</label>
<input id="artist" name="artist" class="text">
</li>
<li>
<label for="subject">Subject<span class="required">*</span></label>
<input id="subject" name="subject" class="text">
</li>
<li>
<label for="message">Message <span class="required">*</span></label>
<textarea id="message" name="message" class="text" rows="6" cols="50"></textarea>
</li>
<li class="buttons">
<input name="imageField" id="imageField" src="images/send.jpg" class="send" type="image">
<div class="clr"></div>
</li>
</ol>
</form>
I will be so grateful if someone can help me out in this...
Thanks!
This is just a simple form with no validation or spam protection. It just works. I have chosen to start simple and work up as I am no expert in php, I don't know a lot to be fair...
My next step is validation of the form fields but honestly I don't know where to start. I have followed a few tutorials and they have not worked so I was wondering if there is someone who would be willing to assist me in working this code out.
The style I am going for is like this... http://junglejap.com/FormTest/
I have found this page but I am not sure how to implement the code into my page... http://bassistance.de/jquery-plugins/jquery-plugin-validation/
here is the form on the php page I am working in html:
<form method="post" action="contact.php" id="contactform">
<ol>
<li>
<label for="name">First Name <span class="required">*</span></label>
<input id="name" name="name" class="text">
</li>
<li>
<label for="email">Your email <span class="required">*</span></label>
<input id="email" name="email" class="text" />
</li>
<li>
<label for="artist">Band/Artist Name</label>
<input id="artist" name="artist" class="text">
</li>
<li>
<label for="subject">Subject<span class="required">*</span></label>
<input id="subject" name="subject" class="text">
</li>
<li>
<label for="message">Message <span class="required">*</span></label>
<textarea id="message" name="message" class="text" rows="6" cols="50"></textarea>
</li>
<li class="buttons">
<input name="imageField" id="imageField" src="images/send.jpg" class="send" type="image">
<div class="clr"></div>
</li>
</ol>
</form>
I will be so grateful if someone can help me out in this...
Thanks!