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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:37:52+00:00 2026-06-18T18:37:52+00:00

I did have a search before hand, yet couldn’t find much that closely replicated

  • 0

I did have a search before hand, yet couldn’t find much that closely replicated the problem I am experiencing. I have recently set up a form to POST method using form elements and PHP. I can confirm that I am receiving the emails and the information for the rest of the fields, yet the <select>and Jquery ‘datepicker’ elements are not passing any information through to email, they resolve as blank.

HTML code as follows:

 <form method="POST" action="mail.php" id="contactform" class="centered">
    <fieldset>
      <input type="text" name="first_name" placeholder="First Name" required>
      <div class="controls controls-row">
        <input type="text" name="last_name" placeholder="Last Name" required>
      </div>
      <input type="email" name="email" placeholder="Email Address" required>
      <div class="controls-row">
        <input type="text" id="datepicker" name="check_in" placeholder="Check-in" required> 
      </div>  
      <div class="controls-row">
        <input type="text" id="datepicker2" name="check_out" placeholder="Check-out" required>
      </div>      
      <div class="controls-row">
        <select id="modalselect" name="rooms">
          <option value="0" selected="selected">Number of Rooms</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5+</option>
        </select>  
      </div>
      <div class="controls-row">
        <select id="modalselect" name="people">
          <option value="0" selected="selected">Number of People</option>
          <option value="1">1</option>
          <option value="2">2</option>
          <option value="3">3</option>
          <option value="4">4</option>
          <option value="5">5</option>
          <option value="6">6</option>
          <option value="7">7</option>
          <option value="1">8</option>
          <option value="2">9</option>
          <option value="3">10+</option>
        </select>
      </div>

      <textarea rows="3" name="additional" input class="input-xparge" placeholder="Anything else?" class="span5"></textarea>
    </fieldset>    
  </form>  
</div>

<div class="modal-footer">
  <button type="submit" name="submit" input type="submit" form="contactform" class="btn btn-block btn-large btn-success"  value="submit">Submit</button>

PHP code as follows:

<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$check_in = $POST['check_in'];
$check_out = $POST['check_out'];
$rooms = $POST['rooms'];
$occupants = $POST['people'];
$additional = $_POST['additional'];
$from = "From: Babbacombe Hall Mailserver";
$to = "lloyd.rees09@bathspa.ac.uk";
$subject = "New Booking Enquiry";

$body = "First Name: $first_name\n Last Name: $last_name\n Email: $email\n Check In: $check_in\n Check Out: $check_out\n Number of Rooms: $rooms\n Number of Occupants: $occupants\n Additional Information: $additional"; 

if ($_POST['submit']) {
 if (mail ($to, $subject, $body, $from)) { 
     echo '<p>Your message has been sent!</p>';
   } else { 
       echo '<p>Something went wrong, go back and try again!</p>'; 
   }
}

?>

Your help and expertise would be greatly appreciated!

  • 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-06-18T18:37:53+00:00Added an answer on June 18, 2026 at 6:37 pm

    Replace this:

    $check_in = $POST['check_in'];
    $check_out = $POST['check_out'];
    $rooms = $POST['rooms'];
    $occupants = $POST['people'];
    

    With this:

    $check_in = $_POST['check_in'];
    $check_out = $_POST['check_out'];
    $rooms = $_POST['rooms'];
    $occupants = $_POST['people'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did a lot search already but couldn't find a straight anwser. I have
I did a search for this question thinking that somebody must have asked it
I did search before posting this question and didn't find anything directly related, so
I did a search around and couldn't find this already asked but I'm sure
Forgive me if this has been asked before; I did a search but couldn't
Update: Ok, after getting past the fact that I did not have MSDTC set
I have asked this question before but did not get the satisfied answer as
I have a website that i did some time ago now they request some
I have Googled merge+cell+Javascript but did not find any suitable code to implement merge
Did my search on the Stackoverflow and Google before already but I could not

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.