Jump to content

PHP Contact Form


chiprivers

Recommended Posts

I have tried to add a simple contact form on my site using the following script:

 

<?php
$mail_from = $_POST['email'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$mail_to= "[email protected]";

$header = "from: $name <$mail_from>";

$send = mail($mail_to,$subject,$message,$header);
?>

 

It is not working though??

 

Is there an error in this script? Is it likely that my hosting package may not allow this feature?

Link to comment
https://forums.phpfreaks.com/topic/84190-php-contact-form/
Share on other sites

does your mail server functioning properly ..

and check if all your fields are filled out completely i dont know

but sometime when one parameter is empty its not sending mail..

 

i suggest put an static value first and see if ti will work so the error will be

easily determine

Link to comment
https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428755
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.