I need help with PHP code
#1

Can someone tell me what is wrong in this code:
PHP код:
<?php
if (isset($_REQUEST['email']))
  {
  
$email $_REQUEST['email'] ;
  
$subject $_REQUEST['subject'] ;
  
$message $_REQUEST['message'] ;
  
mail("you@domain.com""$subject",
  
$message"From:" $email);
  echo 
"Thank you for contacting us!<br />We will try to answer your report.";
  }
  else
  {
  echo 
"<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='Subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='Submit' name='submit' value='Send e-mail'/>
  </form>"
;
  }
?>
When I press send e-mail it doesn't want to send e-mail even tho it says it is sent. And it doesn't return to the mailform if I didn't typed email, subject and message, it just says "Thank you for contacting us! We will try to answer your report." (its the message I placed in echo function). If anyone can help me I will +rep him
Reply


Messages In This Thread
I need help with PHP code - by Nenad - 08.01.2012, 17:08
Re: I need help with PHP code - by [Diablo] - 08.01.2012, 17:15
Re: I need help with PHP code - by Nenad - 08.01.2012, 17:23
Re: I need help with PHP code - by Kwarde - 08.01.2012, 17:36
Re: I need help with PHP code - by TheJayMan - 08.01.2012, 17:44
Re: I need help with PHP code - by Nenad - 08.01.2012, 17:49
Re: I need help with PHP code - by Deagle[WS] - 08.01.2012, 18:21
Re: I need help with PHP code - by BlackBank - 08.01.2012, 19:23
Re: I need help with PHP code - by Nenad - 08.01.2012, 20:57
Re: I need help with PHP code - by Sinner - 08.01.2012, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)