/    Sign up×
Community /Pin to ProfileBookmark

Submit form to email script error

Hello, I have a form:

<form action=”/cgi_bin/feeback.php” method=”post” id=”shout_out”>
Your Name: <input type=”text” name=”name” /><br>
Your Email: <input type=”text” name=”email” /><br>
<textarea name=”comments” rows=”5″ columns=”200″>What’s on your mind?</textarea><br>
<input type=”submit” value=”Shout it!” id=”shout_it_button” />
</form>

that runs this PHP script:

<?PHP

#######################################################

# This script is Copyright 2003, Infinity Web Design #


# Distributed by [url]http://www.webdevfaqs.com[/url] #


# Written by Ryan Brill #


# All Rights Reserved – Do not remove this notice #

#######################################################

## The lines below need to be edited…

###################### Set up the following variables ######################
#
$to = “[email protected]“; #set address to send form to
$subject = “Shout Out!”; #set the subject line
$headers = “From: Franny Sites”; #set the from address, or any other headers
$forward = 1; # redirect? 1 : yes || 0 : no
$location = “http://frannysites.com“; #set page to redirect to, if 1 is above
#
##################### No need to edit below this line ######################

## set up the time ##

$date = date (“l, F jS, Y”);
$time = date (“h:i A”);

## mail the message ##

$msg = “Below is the result of your feedback form. It was submitted on $date at $time.nn”;

if ($_SERVER[‘REQUEST_METHOD’] == “POST”) {
foreach ($_
POST as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header (“Location:$location”);
}
else {
echo “Thank you for submitting our form. We will get back to you as soon as possible.”;
}

?>

and i get the following errors:
The requested URL /cgi_bin/feeback.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I’m sure my server supports PHP and i’m sure this file is in the cgi_bin. ideas?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@otuatailJul 18.2007 — $headers = "From: Franny Sites"; looks odd should be something like

$headers = "From: Franny Sites <$email-adress>rn";
Copy linkTweet thisAlerts:
@otuatailJul 18.2007 — is it feeback.php or feedback.php ? could be spelling or case sensitive problem
×

Success!

Help @amberfrances 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...