kacieh80 Posted September 21, 2006 Share Posted September 21, 2006 hi, I am new to php, very new, i found a script and tweaked it for my liking on this pagewindsor.txkweb.com/contact.htmlworks great, i took the same script only i took out all references to the phone, and i took the same form without the phone part and put it up on this site (in the bottom right hand corner)www.literacycouncil.infoand when you submit on this one, it prompts to download the script rather than running the scriptcould it be my error...i can't see where i am wrong because its exactly the same as the other site accept the phone stuff, or could it be that the ftp site is just not set up for php, if so how do i set it up for php?please help Quote Link to comment Share on other sites More sharing options...
shelbyshop Posted September 21, 2006 Share Posted September 21, 2006 Please post the code you used to put that on your site Quote Link to comment Share on other sites More sharing options...
kacieh80 Posted September 21, 2006 Author Share Posted September 21, 2006 <?php if(isset($_POST['submit'])) { $to = "supersssweety@yahoo.com"; $subject = "Website Form Contact"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; mail($to, $subject, $body); } else { echo "There has been a problem in processing your request"; } ?> <html><head><META HTTP-EQUIV="Refresh" CONTENT="0;URL=thankyou.html"></head></html>this is the one that won't work Quote Link to comment Share on other sites More sharing options...
shelbyshop Posted September 21, 2006 Share Posted September 21, 2006 Place the html code to please Quote Link to comment Share on other sites More sharing options...
kacieh80 Posted September 21, 2006 Author Share Posted September 21, 2006 haha sorry...here is the form return validate() is java script at the top...its on both sites, and it works on this one, just the php won't work for the literacy council...don't you have to set the server up to run php? I can't get into any of those files, I emailed the guy that runs the server, but again, it may not be that <form method="POST" name= "form" action="mailer.php" onSubmit="return validate()"> <h6 align="left">Name:</h6> <input type="text" name="name" size="12"> <h6 align="left">E-mail:</h6> <input type="text" name="email" size="12"> <h6 align="left">Message:</h6> <textarea rows="4" name="message" cols="12"></textarea> <br> <br> <input type="submit" value="Submit" name="submit"> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.