SB Hosting Solutions
September 08, 2010, 04:12:09 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: SMF - Just Installed
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Feedback Script - php/html  (Read 4489 times)
Khem
Newbie
*
Posts: 77



View Profile WWW
« on: September 11, 2004, 07:01:27 PM »

Filename: feedback.php

Code:

<html>
      <head>
<title> Feedback Script </title>
      </head>

   <body bgcolor="#000000" text="#0000CC">
<?
 // If coming back from submit, send the mail!
 if($_POST)
{       // Get the senders IP
$ip = getenv("REMOTE_ADDR");
        // Put the e-mail message together
        $email = "Sender Name:\t".$_POST['name']."\nSender E- Mail:\t".$_POST['useremail']."\nIP:\t{$ip}\n\nMessage:\t".$_POST['message']."\n\n";
        // Sends the mail to this e-mail address
        $to = "you@yourmail.com";
        // Gets the e-mail subject from below
        $subject = $_POST['subject'];
        // Sets the From to whichever e-mail address they entered
        $mailheaders = "From: $name <".$_POST['useremail']."> \n";
        // Same as the comment above but this is for repling
        $mailheaders .= "Reply-To: ".$_POST['useremail']."\n\n";
        // Puts the e-mail together and sends it off!
        mail($to, $subject, $email, $mailheaders);


//Type the site address you wish to redirect them to once they send the feedback, below.
header("Location: http://www.somesiteaddresshere.com/");

// If not coming back from submit, display the form for them to fill out
}
 else
{
//The rest is just the form for the user to fill out
?>
 <form method=post action="feedback.php">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td width="108">
Your Name:
  </td>
  <td width="192">
<input type="text" name="name">
  </td>
</tr>
<tr>
  <td width="108">
Your E-mail:
  </td>
  <td width="192">
<input type="text" name="useremail">
  </td>
</tr>
<tr>
  <td width="108">
Your Subject:
  </td>
  <td width="192">
<select name="subject">
 <option value="Website Errors">
Website Trouble
 <option value="Sales Question">
Sales Question
 <option value="Other">
Other
</select>
  </td>
</tr>
<tr>
  <td width="108" valign="top">
Message:
  </td>
  <td width="300">
<textarea name="message" ></textarea>
  </td>
</tr>
<tr>
  <td width="108">&nbsp;</td>
  <td width="192">
<input type="submit" name="Submit" value="Send Form">
  </td>
</tr>
</table>
</form>
<? } ?>
</body>
</html>



Good luck!   Cool
Logged
Warlock768
Newbie
*
Posts: 1


View Profile
« Reply #1 on: May 03, 2009, 03:03:21 AM »

where did you get that code? that is the code what I am looking for.,

_________________
Indianapolis Web Design
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!