• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

PHP email Script Problem??

jamesharry404

Neues Mitglied
Hello Friends,
There is a QUESTION for you.

This is my form
Code:
<form action=""  method="post">
Name:- <input type="text" name="name" /><br>
E-mail:- <input type="text" name="email" /><br>
Message:- <textarea ></textarea><br>
<input type="Submit" name="mail" />
</form>
Code:
<html>
<body>

<?php
if (isset($_REQUEST['mail']))
  {
  $name= $_REQUEST['name'] ;
  $email= $_REQUEST['email'] ;
  $message = $_REQUEST['message'] ;
  mail("[email protected]", $subject,
  $message, "From:" . $email);
  echo "Thank you for using our mail form";
  }
else
  {
echo "Message not send";
  }
?>

</body>
</html>

Please tell me is it correct or not if correct so please modified it or it's wrong so please correct it and modified it also.

thank you in advance

_____________________________________________________
Wedding Planners in Delhi |

Canadian Visa
 
If it works, it's ok, otherwise not
Don't use the mail-function from PHP, use a complete class like phpMailer
Why $_REQUEST and not $_POST?
 
I was check this code on my localhost it's not working.
then i run this code on server it's work but the format of mail is odd how to do change in receiving mail.

Please reply
Thank you in advance......
 
Please tell me which part of this code is so important with it's work also

Code:
<? Php
if (isset ($ _REQUEST ['email']))
  {
  $ Name = $ _REQUEST ['name'];
  $ Email = $ _REQUEST ['email'];
  $ Message = $ _REQUEST ['message'];
  mail ("[email protected]", $ subject,
  $ Message, "From:". $ Email);
  echo "Thank you for using our mail form";
  }
else
  {
echo "Message not sent";
  }
>
 
Zurück
Oben