/    Sign up×
Community /Pin to ProfileBookmark

Unable to get PHP contact form working

Here is my site:
[url]http://torontoitsolutions.com/test/contactus.html[/url]
which contains the form code:

[code]
<form method=”post” action=”sendmail.php”>
<p>Name:</p><p> <input type=”text” name=”name” size=”35″ /><br />
<br /> Email:<br /><input type=”text” name=”email” size=”35″ />
<br />
<br />
Message: <br />
<textarea name=”message” cols=”30″ rows=”4″></textarea>
<br />
<input type=”submit” value=”Submit” />
<br />
</p>
</form>
[/code]

this is my sendmail.php:

[CODE]<?php
$email = $_REQUEST[’email’] ;
$name = $_REQUEST[‘name’] ;
$message = $_REQUEST[‘message’] ;

mail( “[email protected]”, “Quote Request”,
$message, “From: $name”, “Email: $email” );
header( “Location: thankyou.html” );
?>
[/CODE]

The form does not send the email to me. please help fix, thanks!

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@Sars_Mar 03.2008 — I'm not sure, but I think you gotta have the correct mail settings configured server-wise (like SMTP stuff).

Grtz,

SaRs!
Copy linkTweet thisAlerts:
@HanifBauthorMar 03.2008 — I will check SMTP settings on the server end but I don't think thats the problem. Thanks though, I thought it would be a coding issue.
×

Success!

Help @HanifB spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...