Reply
Help with ne contac us page
Old 03-04-2008, 02:49 PM Help with ne contac us page
Fenwolf's Avatar
Experienced Talker

Posts: 35
Name: James
Hi everyone.

I need a bit of help with a new page for my site. I just created a new Contact Us page and am having some problems with the codeing for the contact form could some one take a look and tell me what I did wrong. Any help would be greatful. Thanks.

here is the page link:

http://www.medievalmagic.ca/test/contact-us.html

and here is the coding:

<form id="ContactUs" name="ContactUs" onsubmit="mailto:info@medievalmagic.ca" action="mailto:info@medievalmagic.ca" method="post">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="35%">Your name:</td>
<td width="65%"> <input style="background-color: #ffffa0;" id="Name" title="Your Google Toolbar can fill this in for you. Select AutoFill" type="text" value="" name="Name" /></td>
</tr>
<tr>
<td>Your email address for reply:</td>
<td> <input style="background-color: #ffffa0;" id="EmailAddress" title="Your Google Toolbar can fill this in for you. Select AutoFill" type="text" value="" name="EmailAddress" /></td>
</tr>
<tr>
<td>Your question:</td>
<td><textarea id="Question" name="Question" rows="5" cols="30">&nbsp;</textarea></td>
</tr>
</tbody>
</table>
<p align="center">
<input type="submit" value="Email us" name="Submit" />
</p>
</form>
Fenwolf is offline
Reply With Quote
View Public Profile Visit Fenwolf's homepage!
 
When You Register, These Ads Go Away!
Old 03-04-2008, 03:44 PM Re: Help with ne contac us page
chrishirst's Avatar
Super Moderator

Posts: 13,609
Location: Blackpool. UK
and the problem you are having is?????
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-04-2008, 03:53 PM Re: Help with ne contac us page
Junior Talker

Posts: 2
Name: Andrew Braudway
Location: Houston, Texas
you have your post/action incorrect. hopefully this helps:
1: change this line of code

<form id="ContactUs" name="ContactUs" method="post" action="contactus.php" >


This makes the form post to a php file and email it to you.

2: copy and paste this code in your favorite text editor and save it as "contactus.php" then upload to the same folder as your contactus.html

here is the code for php file

<?

$your_email = "info@medievalmagic.ca";

$headers= "From: ".$_POST['name']." <".$_POST['EmailAddress'].">\r\n";
$headers.='Content-type: text/html; charset=utf-8';
mail($your_email, $_POST['subject'], "
<html>
<head>
<title>Contact Us</title>
</head>
<body>
Contact Message<br><br>
Full Name : ".$_POST['Name']."<br>
Email : ".$_POST['EmailAddress']."<br>
Question : ".$_POST['Question']."<br>
</body>
</html>" , $headers);
header("Location: ./contact_message.html");
?>

3: create an html file named "contact_message.html" this is called your success page, you can put some text like "email received, we will get back to you as soon as possible" you can use the same page as your contact us page, rename it and change text.

I hope this helps if you have any questions feel free to ask. good luck
Andrew Braudway is offline
Reply With Quote
View Public Profile Visit Andrew Braudway's homepage!
 
Old 03-04-2008, 04:23 PM Re: Help with ne contac us page
Fenwolf's Avatar
Experienced Talker

Posts: 35
Name: James
Thanks Andrew it worked. Now I see where I went wrong in the code. This is my first time creating my own website. Our designer for our current site quit because I started to ask to many questions about how things worked and how could I do some stuff my self. So in the next 3 months I have to have everything ready to go for set up on a new host and a new shopping cart. So I bought some books and am starting to learn how to do this stuff myself. So I may be back for more help later on as I go. Thanks.
Fenwolf is offline
Reply With Quote
View Public Profile Visit Fenwolf's homepage!
 
Old 03-04-2008, 05:09 PM Re: Help with ne contac us page
Junior Talker

Posts: 2
Name: Andrew Braudway
Location: Houston, Texas
Glad I could help, remember forums are a great place to get answers when your stumped and a book doesn't help.
Andrew Braudway is offline
Reply With Quote
View Public Profile Visit Andrew Braudway's homepage!
 
Old 03-04-2008, 05:26 PM Re: Help with ne contac us page
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Quote:
Originally Posted by Fenwolf View Post
Thanks Andrew it worked. Now I see where I went wrong in the code. This is my first time creating my own website. Our designer for our current site quit because I started to ask to many questions about how things worked and how could I do some stuff my self. So in the next 3 months I have to have everything ready to go for set up on a new host and a new shopping cart. So I bought some books and am starting to learn how to do this stuff myself. So I may be back for more help later on as I go. Thanks.
What a bad website designer. lol, you supposed to design the website so that other people can add / edit content easily.

hint hint, i can do this for you..
Gilligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with ne contac us page
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14729 seconds with 12 queries