|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
 |
|
|
10-19-2008, 11:48 AM
|
Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
I have a problem with my contact form, i havent done any webmaster work for around 2-3 years now and im finding it difficult with some of the coding, but dont know where i am going wrong with my form, it goes to my email address but when i open the email its all a load of crap,
here is my coding
<div id="sidebar" style="WIDTH: 99.42%; HEIGHT: 838px">
<p>Name<br><input name="Name"> </p>
<p>E-mail address<br><input name="Emailaddress"> </p>
<p>Message<br><textarea style="WIDTH: 344px; HEIGHT: 140px" name="Message" rows="8" cols="40"></textarea> </p>
<p><form
action="mailto:jonny.jones@gmail.com"
method="post"
enctype="multipart/form-data"
name="EmailForm">
<input type="submit" value="Send">
</form>
please help me
|
|
|
|
10-19-2008, 12:05 PM
|
Re: Contact form help
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
use server side code to send emails.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-19-2008, 12:11 PM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
sorry dont understand, could you possibly do the coding for me, or adjust the one i made so it can work, ive been at it for days and cant find no tutorials that can help me, its been cooking the brain inside of me. lol
|
|
|
|
10-19-2008, 12:26 PM
|
Re: Contact form help
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
server side code = ASP, PHP, ASP.NET, Perl, Python, ColdFusion, etc your host may well support CGI script formmail if you have no scripting set up
and there are THOUSANDS of contact form scripts in every language possible dotted around the internet, a google search will get you several hundred in couple of seconds or so.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-19-2008, 12:57 PM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
Ive searched google many times, i just want a basic html one that works, i dont have the best html editor and well its begining to beat me i think.
|
|
|
|
10-19-2008, 01:23 PM
|
Re: Contact form help
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
Your code in the first post IS a basic HTML one, and is the ONLY thing you can do using HTML code alone. Anything more that what you have now or how it appears (visually) in your email client, such as better formatting, extra information etc, will require the application of server side processing.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-20-2008, 03:03 PM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
ive tried all evening to do this, does anyone know of any tutorials on this issue
|
|
|
|
10-20-2008, 04:02 PM
|
Re: Contact form help
|
Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
|
you could tell us what server side code you can use so we can point you in the right direction.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-21-2008, 11:03 AM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
my server supports php does it mean if i use php i have to change my .html to .php, i think thats what you mean, or can u justify to me what server side code means
|
|
|
|
10-21-2008, 11:17 AM
|
Re: Contact form help
|
Posts: 100
Name: Jason
Location: Seattle, WA
|
First, your form needs all input elements wrapped around form tags. And second, it should post to a php page to process the form and send the email. Change your html to this:
Code:
<div id="sidebar" style="WIDTH: 99.42%; HEIGHT: 838px">
<form action="mail.php" method="post">
<p>Name<br><input name="Name"> </p>
<p>E-mail address<br><input name="Emailaddress"> </p>
<p>Message<br><textarea style="WIDTH: 344px; HEIGHT: 140px" name="Message" rows="8" cols="40"></textarea> </p>
<p><input type="submit" value="Send"></p>
</form>
</div>
Next you make your php script called mail.php. This is very basic to test if php mail is supported on your server. Here's an example:
Code:
<?php
$name = $_POST['Name'];
$email = $_POST['email'];
$message = $_POST['message'];
if (!$name || !$email || !$message) {
die('Please enter name, email, and message');
}
// Body of email
$sendMessage = 'Message from user: ' . $name . PHP_EOL;
$sendMessage .= 'Email: ' . $email . PHP_EOL;
$sendMessage .= $message;
mail('johnny.jones@gmail.com', 'Message from user', $sendMessage);
See if that works and sends you an email. Later you can worry about validation.
|
|
|
|
10-21-2008, 11:45 AM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
|
|
|
|
10-21-2008, 12:03 PM
|
Re: Contact form help
|
Posts: 100
Name: Jason
Location: Seattle, WA
|
Hmmm I'm confused by the use of frames, is that cause you're on freesitespace?
It's not processing PHP as php but as html, that's your problem.
|
|
|
|
10-21-2008, 12:09 PM
|
Re: Contact form help
|
Posts: 64
Name: jonathan
Location: wales, uk
|
ah rite, ye im using free hosting on that project, that could well be it, i thought a basic contact form would work using html.
ok thanks, ill try it on a premium host, ill let u know
|
|
|
|
10-21-2008, 12:26 PM
|
Re: Contact form help
|
Posts: 100
Name: Jason
Location: Seattle, WA
|
Found a site that could help you out... I'm testing it right now.
http://www.emailmeform.com/
You post your form to them, they email it off for you and redirect back to your site. Probably the quickest and easiest option for you.
|
|
|
|
10-21-2008, 12:36 PM
|
Re: Contact form help
|
Posts: 100
Name: Jason
Location: Seattle, WA
|
yeah this will work good for you, I tested it out. It even has a captcha and spam filtering, and it's free.
If you're planning on becoming a web developer though you should learn some kind of scripting language like php and learn how to set this up yourself.
|
|
|
|
|
« Reply to Contact form help
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
|