Jump to content

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= "name@domain.com";

$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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.