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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:39:57+00:00 2026-06-01T09:39:57+00:00

Okay I’m working in jQuery mobile, and I just put in a PHP script

  • 0

Okay I’m working in jQuery mobile, and I just put in a PHP script for the email form. Everything works great, except nothing is being sent to my inbox. Here is the form and php code, could really use some help here. Been scratching my brain for the longest.

<?php
if($_SERVER['REQUEST_METHOD'] == "POST") 
{
    $message_body = 'First Name: ' . $_POST['firstName'] . '
            Last Name: ' . $_POST['lastName'] . '
            Email: ' . $_POST['email'] . '
            Company: ' . $_POST['company'] . '
            Phone: ' . $_POST['phone'] . '
            Services: ' . $_POST['serviceAreas'] .'
            Message: ' . $_POST['comments'];

    $to      = 'marvin.fai2@gmail.com';
    $subject = 'MobilizeWorldwide.com Contact Submission';
    $message = $message_body;
    $headers = 'From: info@mobilizeworldwide.com' . "\r\n" .
            'Reply-To: ' . $_POST['email'] . "\r\n" .
            'X-Mailer: PHP/' . phpversion();

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

    header('Location: ' . $_POST['thankspage']);
}
else
{
    echo 'There is no post information.';
}

HTML:

 <form method="post" action="email.php">
          <input type="text" name="firstName" placeholder="First name" required>
          <input type="text" name="lastName" placeholder="Last name" required>
          <input type="text" name="email" placeholder="Email Address" required>
          <input type="text" name="company" placeholder="Company">
          <input type="text" name="phone" placeholder="Phone Number">
          <fieldset>
            <legend>Please indicate service areas of interest, and select all that apply:</legend>
            <input id="airFrame" name="serviceArea" type="checkbox">
            <label for="airFrame">VISA</label>
            <input id="compMaint" name="serviceArea" type="checkbox">
            <label for="compMaint">AmEx</label>
            <input id="engineAPU" name="serviceArea" type="checkbox">
            <label for="engineAPU">Mastercard</label>
            <input id="engineAPULeas" name="serviceArea" type="checkbox">
            <label for="engineAPULeas">VISA</label>
            <input id="lMaint" name="serviceArea" type="checkbox">
            <label for="lMaint">AmEx</label>
            <input id="gTS" name="serviceArea" type="checkbox">
            <label for="gTS">Mastercard</label>
            <input id="onW" name="serviceArea" type="checkbox">
            <label for="onW">VISA</label>
            <input id="train" name="serviceArea" type="checkbox">
            <label for="train">AmEx</label>
          </fieldset>
          <textarea id="comments" name="comments" placeholder="Comments" rows="8"></textarea>
          <button type="submit" value="Submit" name="submit">
        </form>
  • 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-01T09:39:58+00:00Added an answer on June 1, 2026 at 9:39 am

    i didn’t consider your html form as i believe your post method working fine and email.php getting all values as you set, here in my case i am assuming dummy values for checking you script,

    <?php
    
    $message_body = 'First Name: ' . "tariq" . '
            Last Name: ' . "sarwar" . '
            Email: ' . "mts@gmail.com" . '
            Company: ' . "renai" . '
            Phone: ' . "123456" . '
            Services: ' . "abcdef" .'
            Message: ' . "Test message" ;
    
    $to      = 'mtarik.sarwar@gmail.com';
    $subject = 'MobilizeWorldwide.com Contact Submission';
    $message = $message_body;
    $headers .= 'From: "user" <user@domain.com>' . "\r\n";
    

    if(mail($to, $subject, $message, $headers))
    echo “msg sent”;
    else
    echo ‘There is no post information.’;

    ?>

    as i mentioned it before that i got the results but as spam for gmail, and working fine for other mailing servers;

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so i just wanted to put a little search form on my site
Okay so im working on this php image upload system but for some reason
Okay, here's the rundown. I'm developing a video hosting site with PHP and jQuery
Okay im making a mobile application using jquery, and then im using phonegap to
Okay, I've looked all over the internet for a good solution to get PHP
Okay. I know this looks like the typical Why didn't he just Google it
Okay, I'm a little fuzzy on how this works or if it's possible. I
Okay so here is my database: I have a page on my .net form
Okay I got some good advice for Mobile Detection but still having an issue
Okay, first some background, I can't use any javascript library except YUI for this

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.