Papalex606 Posted May 13, 2007 Share Posted May 13, 2007 Hi, i really need your help, could anyone show me how to apply : - <?php // bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] ) mail('nobody@example.com', 'the subject', 'the message', null, '-fwebmaster@example.com'); ?> to my contact.php code: - <?php $your_company = $_GET['company']; $your_name = $_GET['name']; $your_phone = $_GET['phone']; $your_email = $_GET['email']; $your_message = $_GET['message']; $recipient_email = "info@darkiconstudios.com"; $subject = "from " . $your_email; $headers = "From: " . $your_name . " <" . $your_email . ">\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1'; $content = "<html><head><title>Contact letter</title></head><body><br>"; $content .= "Company: <b>" . $your_company . "</b><br>"; $content .= "Name: <b>" . $your_name . "</b><br>"; $content .= "Phone: <b>" . $your_phone . "</b><br>"; $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>"; $content .= $your_message; $content .= "<br></body></html>"; mail($recipient_email,$subject,$content,$headers); ?> <html> <body bgcolor="#282E2C"> <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold"> Your message was sent. Thank you. </div> </body> </html> <script>resizeTo(300, 300)</script> I have no idea what im doing, i dont want to change anything because i know i'll cause myself even more problems. If someone could rewrite the contact.php code above with the new code in it, id be forever grateful. the email address im trying to apply is 'info@darkiconstudios.com' Many, many thanxs, Lex. Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/ Share on other sites More sharing options...
scadran Posted May 13, 2007 Share Posted May 13, 2007 what kind of error are u facing with ? Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252164 Share on other sites More sharing options...
Papalex606 Posted May 13, 2007 Author Share Posted May 13, 2007 oh naaa, im not getting any errors, i just havnt got a clue how to put that sendmail code into the contact.php code above or what parts of it to change to get it working. I know very little about this sort of stuff! Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252171 Share on other sites More sharing options...
Papalex606 Posted May 13, 2007 Author Share Posted May 13, 2007 can anyone help me sort this problem? Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252253 Share on other sites More sharing options...
marf Posted May 13, 2007 Share Posted May 13, 2007 First of all, do you have an HTML page with a form, which when submitted goes to this page contact.php? Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252290 Share on other sites More sharing options...
Papalex606 Posted May 13, 2007 Author Share Posted May 13, 2007 no i dont think so. Its a flash template im editting. Ive managed to edit the contact form on that and get it working, but for some reason, when i click submit, it says 'thankyou, your message was sent' but in recieve no mail in my inbox when i check. many thanxs Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252299 Share on other sites More sharing options...
boo_lolly Posted May 13, 2007 Share Posted May 13, 2007 it looks like you've already got a mail function at the bottom of your contact.php file. what exactly are you having trouble with? why do you want to use another mail function? Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252365 Share on other sites More sharing options...
Papalex606 Posted May 13, 2007 Author Share Posted May 13, 2007 i dont, im trying to figure out why im not being sent messages. Ive manged to get the contact form working, i fill it out, ive managed to get the contact.php error less but for some reason when i now visit my website online, fill out the contact form with another of my address and select sumbit, it says 'thankyou your message was sent' but i dont ever recieve any messages in my email inbox. Ive tried everything to get it working, but these messages jsut get lost in space. im desperate. please help! :'( Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252371 Share on other sites More sharing options...
Barand Posted May 13, 2007 Share Posted May 13, 2007 Just so you don't waste any more people's time answering both your double-posts I'm closing this one. Don't double-post, read the forum guidelines. Link to comment https://forums.phpfreaks.com/topic/51208-could-someone-help-me-apply-this-code-to-my-contactphp-im-desperate/#findComment-252387 Share on other sites More sharing options...
Recommended Posts