Jump to content

email form post! need assistance please...


moise

Recommended Posts

hello, i am trying to get my email to show just the message entered on my textarea, how would i get to do that? Because i am getting the following :

name: mymane

email: [email protected]

subject: test again....

message: testing! hope it'll be ok, this time, this time

submit: Send

instead of just the message posted (testing! hope it'll be ok, this time, this time)

could you please help?

here's the code...
----
$my_email = "[email protected]";

$errors = array();
if($_SERVER['REQUEST_METHOD'] == "POST"){$form_input = $_POST;}elseif($_SERVER['REQUEST_METHOD'] == "GET"){$form_input = $_GET;}else{exit;}

function build_message($request_input){if(!isset($message_output)){$message_output = "";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!is_numeric($key)){$message_output .= "\n\n".$key.": ".build_message($value);}else{$message_output .= "\n\n".build_message($value);}}}return $message_output;}

$message = build_message($form_input);

$message = $message . "\n\n-- \nThank you for using  http://tyreesetavares.com";

$message = stripslashes($message);

$subject = $_POST['subject'];

$headers = "From: " . $form_input['email'] . "\n" . "Return-Path: " . $form_input['email'] . "\n" . "Reply-To: " . $form_input['email'] . "\n";

mail($my_email,$subject,$message,$headers);

-------
Link to comment
https://forums.phpfreaks.com/topic/34927-email-form-post-need-assistance-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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