Topic awaiting preservation: PHP mail form |
|
---|---|
Author | Thread |
Maniac (V) Inmate From: Den Haag: The Royal Residence |
posted 08-03-2006 14:35
Currently i am working on my new site, and i want to use an php mail-form for the people to contact me. quote:
quote:
|
Paranoid (IV) Inmate From: Australia |
posted 08-03-2006 15:45
code: if($succes) //checking if the mail has been send, succes should be true if the mail was send. echo "Je bericht is verstuurd, bedankt en je krijgt zo snel mogelijk antwoord"; else echo "Helaas is er wat misgegaan, je bericht is NIET verstuurd"; header("location:contact.html"); //redirecting to the contact page.
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 08-03-2006 17:07
on a side node ,that script is wide open for a header injection in at least three ways ( seach this very forum ), |
Maniac (V) Inmate From: Den Haag: The Royal Residence |
posted 08-04-2006 12:26
In the current stituation the contact.php page is calling an file called "process-mail.php" then process-mail.php returns to contact.php and the $succes var is called. This returns the message that my mail is not send. Which is wrong since the mail has been send. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 08-04-2006 13:15
1 ) Keep process-mail.php, but don't call it as a webpage, include it in your contacts.php. code: if ( !empty ($_POST ) ) { include ( "process-mail.php") }
code: if ( isset ( $success ) ) { if ( $success ) print "your mail has been sent successfully"; else print "error"; }
|