Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:00:47+00:00 2026-05-24T11:00:47+00:00

Ive got a form where users report posts <form method=post action=sendmail.php name=Email form> Message

  • 0

Ive got a form where users report posts

<form method="post" action="sendmail.php" name="Email form">
Message ID <input type="text" name="message id" /><br/><br/>
Aggressive conduct <input type="radio" name="option1" value="aggressive contact" /><br/><br/>
Offensive conduct <input type="radio" name="option2" value="offensive conduct" /><br/><br/>
Rasical conduct <input type="radio" name="option3" value="Rasical conduct" /><br/><br/>
Intimidating conduct <input type="radio" name="option4" value="intimidating conduct" /><br/><br/>
<input type="submit" name="submit" value="Send Mail" />
</form>

And then it fires a php mail function which send the report to me

<?php
$to      = 'root@localhost';
$subject = 'Report';
$message = 'message id\option1\option2\option3\option4';
$headers = 'From: postmaster@localhost' . "\r\n" .
    'Reply-To: postmaster@localhost' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

I want it to take the values inputted by users in the form and mail them to me. As it stands its DOES send a mail but it just say in the mail

message id\option1\option2\option3\option4

Now i understand this is what i put in for ‘$message’ but as this is what i called the input in the form i thought this is what it would take! What am i missing to do this?

The php mail function IS working so this is not the problem. Im sure im just missing some code to get it working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:00:48+00:00Added an answer on May 24, 2026 at 11:00 am

    Message ID <input type="text" name="message id" /><br/><br/>
    the name attribute here is incorrect and will need to be renamed to “message_id” instead.

    Your radio buttons should have the same name (eg. “conduct”)
    and then change

    $message = 'message id\option1\option2\option3\option4';
    

    to something like this:

    $message = "message id: $_POST[message_id]\conduct $_POST[conduct]";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a sign up form that requires the user to enter their email
I've got text in a form of [1/12/2008 2:32:11 p.m. - name] line 1
I've got a pretty simple web form which lets users pick reports, one specific
ive got list of reports. for default, the report list will be showing all
So I've got a form in my Rails app which uses a custom FormBuilder
I've got a form where I have two radio buttons and two interchangeable controls
I've got a form that's a few pages long. To traverse the form all
I've got a form inside an <asp:Content> block that is being submitted to a
I've got a form with a bunch of controls on it, and I wanted
I've got a web form with Password and Confirm Password text boxes. I've got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.