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 6040355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:30:08+00:00 2026-05-23T06:30:08+00:00

I have a form set up and working nearly perfectly. I am using the

  • 0

I have a form set up and working nearly perfectly. I am using the select option to either hide or display other text fields and their associated titles. For example, if option “1” is selected from the drop-down, the form will only display one text field. If option “2” is selected, the first text field is displayed along with a second field.

Two problems come from my current code.
The first problem: When using POST to send myself an e-mail with the data, it shows me the field values for Total Members (which are currently other field ID’s) and I would prefer to be sent the options (1, 2, 3, etc).
The second problem: Using POST to send myself an e-mail with the data, it simply does not show me ANY data for what the text fields (Driver_Name1, Driver_Name2, etc) contained.


The email I receive looks like this:

Team Name: team name here
Team Leader: the team leader’s name
Team Leader’s E-mail: my@email123.com
Total Members: driver_name1_1,Driver_Name1
Members:

Comments: whatever comments I make


What I want the e-mail to look like:

Team Name: team name here
Team Leader: the team leader’s name
Team Leader’s E-mail: my@email123.com
Total Members: 5
Members: Bob, George, Tom, Larry, David

Comments: whatever comments I make


I can’t get the code for the form to display properly here. It can be viewed here: link removed

Here is the code I have in test_send.php for the actual work being done behind the scenes:

<?php
  $name = $_REQUEST['Team_Name'] ;
  $leader = $_REQUEST['Team_Leader'] ;
  $email = $_REQUEST['Leader_Email'] ;
  $members = $_REQUEST['team_members'] ;
  $drivers = $_REQUEST['Driver_Name1,Driver_Name2,Driver_Name3,Driver_Name4,Driver_Name5'] ;
  $comments = $_REQUEST['Comments'] ;

  mail( "my@email.com", "Registration Form From $leader", 
         "Team Name: $name \r\nTeam Leader: $leader\r\nTeam Leader's E-mail: $email \r\nTotal Members: $members \r\n\Members: $drivers \r\n\r\nComments: $Comments", "" );
  header( "Location: http://mysite.com/send.php" );
?>

EDIT
Problem Solved

Thanks again to Tudor Constantin for nudging me in the right direction. I have solved all of my problems. Everything corrected was in the code for the send file.

    <?php
  $name = $_REQUEST['Team_Name'] ;
  $leader = $_REQUEST['Team_Leader'] ;
  $email = $_REQUEST['Leader_Email'] ;
  $members = $_REQUEST['team_members'] ;
  $comments = $_REQUEST['Comments'] ;
  $drivers = $_REQUEST ['Driver_Name1'].', '. $_REQUEST['Driver_Name2'].', '. $_REQUEST['Driver_Name3'].', '. $_REQUEST['Driver_Name4'].', '. $_REQUEST['Driver_Name5'] ; 

if ( $team_members == "driver_name1_1,Driver_Name1" ) { $members1=1 ; }
elseif ( $team_members == "driver_name1_1,driver_name2_1,Driver_Name1,Driver_Name2" ) { $members1=2 ; }
elseif ( $team_members == "driver_name1_1,driver_name2_1,driver_name3_1,Driver_Name1,Driver_Name2,Driver_Name3" ) { $members1=3 ; }
elseif ( $team_members == "driver_name1_1,driver_name2_1,driver_name3_1,driver_name4_1,Driver_Name1,Driver_Name2,Driver_Name3,Driver_Name4" ) { $members1=4 ; }
elseif ( $team_members == "driver_name1_1,driver_name2_1,driver_name3_1,driver_name4_1,driver_name5_1,Driver_Name1,Driver_Name2,Driver_Name3,Driver_Name4,Driver_Name5" ) { $members1=5 ; }

if ( $members1 == "1" ) { $drivers = $_REQUEST ['Driver_Name1'] ; }
elseif ( $members1 == "2" ) { $drivers = $_REQUEST ['Driver_Name1'].', '. $_REQUEST['Driver_Name2'] ; }
elseif ( $members1 == "3" ) { $drivers = $_REQUEST ['Driver_Name1'].', '. $_REQUEST['Driver_Name2'].', '. $_REQUEST['Driver_Name3'] ; }
elseif ( $members1 == "4" ) { $drivers = $_REQUEST ['Driver_Name1'].', '. $_REQUEST['Driver_Name2'].', '. $_REQUEST['Driver_Name3'].', '. $_REQUEST['Driver_Name4'] ; }
elseif ( $members1 == "5" ) { $drivers = $_REQUEST ['Driver_Name1'].', '. $_REQUEST['Driver_Name2'].', '. $_REQUEST['Driver_Name3'].', '. $_REQUEST['Driver_Name4'].', '. $_REQUEST['Driver_Name5'] ;  }



  mail( "myemail", "Registration Form From $leader", 
         "Team Name: $name \r\nTeam Leader: $leader\r\nTeam Leaders E-mail: $email \r\nTotal Members: $members1 \r\nMembers: $drivers \r\n\r\nComments: $Comments", "" );
  header( "Location: mysite" );
?>
  • 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-23T06:30:09+00:00Added an answer on May 23, 2026 at 6:30 am

    Edit your code and concatenate the drivers like:

    $drivers = $_REQUEST['Driver_Name1].' '. $_REQUEST['Driver_Name2'].' '. ...;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form_remote working perfectly for the form currency. The only change I
I am using Django ModelForms to create a form. I have my form set
I have a ListView control on my form set up like this in details
Okay, so I have this form that is set to preload a DB record
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
I have a parent form that is set to be TopMost and then I
I have a form whose action is set to itself. I want it this
I have a form that contains dataGridView, whose coloumn are set to dgrv1.Width =dgrv1.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)+20;
In my form I have a set of input boxes where a user can
I have a model form that contains a DecimalField() with max_digits set to 5.

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.