Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-08-2012, 01:15 PM   PM User | #1
colourflow
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
colourflow is an unknown quantity at this point
Need help with HTML5 & PHP coding

Desperately need help with my website coding. The 'contact form' and 'site search' facility not working properly.
Contact form works i.e. I get the email but it does not show the message that has been written by the sender.
The site search facility just does not work.

website is colourflow-images.co.uk

Really need help with this one
colourflow is offline   Reply With Quote
Old 10-08-2012, 03:03 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
form on contact page
Code:
<form id="ContactForm" form action="contact.php" method="post" id="form" class="ContactForm">
form action="contact.php" S/B action="contact.php". No form.

You have two IDs.can only have one.

Your search form doesn't seem to have a file or function it is submitted to. So no processing.

Last edited by sunfighter; 10-08-2012 at 03:10 PM..
sunfighter is offline   Reply With Quote
Old 10-08-2012, 10:27 PM   PM User | #3
colourflow
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
colourflow is an unknown quantity at this point
Hi sunfighter, I have absolutely no idea what you are talking about. I am new to coding!
colourflow is offline   Reply With Quote
Old 10-09-2012, 02:59 AM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
This is your contact form:
Code:
<form id="ContactForm" form action="contact.php" method="post" id="form" class="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>
	<span>&nbsp;</span>
	<a href="#" class="button" onClick="document.getElementById('ContactForm').reset()">Clear</a>
	<a href="#" class="button" onClick="document.getElementById('ContactForm').submit()">Send</a>
  </div>
</form>
You have two ID's (the dark green) You can not have more than one ID for the entire html page. Remove the ID="form".

The dark red attribute reads "form action". Remove the word form so that it is just action="contact.php".

Your contact email should be generated by contact.php. It should be in the same folder as the Contact.html file.
---------------------------------------
Instead of
Code:
<a href="#" class="button" onClick="document.getElementById('ContactForm').reset()">Clear</a>
<a href="#" class="button" onClick="document.getElementById('ContactForm').submit()">Send</a>
You could use
Code:
<input type="submit" value="Submit">
<input type="reset">
Better presentation.
======================================================================
Your search form is:
Code:
<form id="search" method="post">
  <div>
	<input type="submit" class="submit" value="">
	<input class="input" type="text" value="Site Search" onblur="if(this.value=='') this.value='Site Search'" onfocus="if(this.value =='Site Search' ) this.value=''">
  </div>
</form>
As you can see the form tag does not have the action attribute and that's where the info in the form is sent. You are not submitting the form to any thing. Add the action attribute and give it a file to process the information.
sunfighter is offline   Reply With Quote
Old 10-09-2012, 09:47 PM   PM User | #5
colourflow
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
colourflow is an unknown quantity at this point
Sunfighter

Many thanks I really appreciate your guidance.

Unfortunately having made the changes you suggested the email did not even go through, whereas before the email went through but no test arrived.
colourflow is offline   Reply With Quote
Old 10-09-2012, 09:57 PM   PM User | #6
colourflow
New to the CF scene

 
Join Date: Oct 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
colourflow is an unknown quantity at this point
Hi Sunfighter

Apologies - double checked and noticed that in the Contact.php I had made an error in the email address. Have put your coding back in and although the email arrives it still does not show the text.
colourflow is offline   Reply With Quote
Old 10-10-2012, 04:02 PM   PM User | #7
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,383
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
Think your email problem is in the Contact.php file. post that.
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Tags
contact form, html, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:50 AM.


Advertisement
Log in to turn off these ads.