hey all
ive been reading this forum non stop for the past little while trying to figure out how to make this work.
what happened was that my page had a mailing list form that people fill out their name, email, etc. and it just emails the info to someone and then that someone just takes those emails and sticks them in a mailing list. pretty straight forward.
well i must be an idiot because we’re launching our new site and i was cleaning up the server of all the old files and i mustve deleted a php file or something because the form ceases to work now.
aka, i have to make a new one.
i’ve been reading and educating myself on php as i’m pretty new to it. i’ve been designing and junk with html for a long time but havent had the server to support php so there was no real reason to get to know it i guess.
anyway, i did find some real useful stuff on here and i think i’ve researched here enough to make it work but its not and i have no clue.
i used this code for my .php page
[code=php]
<?PHP
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Written by Ryan Brill – [email][email protected][/email] #
# All Rights Reserved – Do not remove this notice #
#######################################################
## The lines below need to be edited…
###################### Set up the following variables ######################
# #
$to = “[email protected]”; #set addres to send for to
$subject = “Sign my ass up”; #set the subject line
$headers = “From: Mailing List”; #set the from address
$forward = “1”; # redirect? 1 : yes || 0 : no
$location = “news.htm”; #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”;
foreach ($_POST 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.”);
}
?>
i dont really understand the bottom part but i think i’ve deleted enough stuff to know that if its not hurting anything to leave it alone.
here is my page that i’m trying to make work.
[url]http://www.acantha.ca/new/mailing2.htm
dont click on any of the other links and expect to get back to that page by clicking again as that is just a test page.
anywho, just wondering what i’m doing wrong. whenever i click submit, it just brings me to a “cant find the page” page. i’ve uploaded all those files in the same directory so it should work, but i’m pretty stumped.
if anyone could shed some light on the matter as to what i’m doing or not doing that’d be sweet
thanks dudes.
devon