Log In · Register

 
PHP email form thing
heyo-captain-jac...
post Aug 15 2009, 02:35 PM
Post #1


/人◕‿‿◕人\
*******

Group: Official Member
Posts: 8,283
Joined: Dec 2007
Member No: 602,927



CODE
<?php
if (isset($_REQUEST['email']))
  {
  $email = $_REQUEST['email'];
  $subject = $_REQUEST['subject'];
  $message = $_REQUEST['message'];
  mail( "example@example.com", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you.";
  }
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='10' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>


Someone with a brain for PHP, make sure I didn't mess that up anywhere.


The issue is when I load it in IE, all I see is the source code. But when I refresh it, everything renders properly.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: