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: mymane@yahoo.com

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 = "myemail@yahoo.com";

$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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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