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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:57:12+00:00 2026-05-15T18:57:12+00:00

My form validates and submits fine, but the variables are not being printed in

  • 0

My form validates and submits fine, but the variables are not being printed in the emailed results.

Can anyone take a quick look at my processing file and tell me why this might be?

<?php

// CHANGE THE VARIABLES BELOW



$EmailFrom = $EmailFrom;
$EmailTo = "me@me.com";
$Subject = "Proposal Submission";


$FirstName = $HTTP_POST_VARS['FirstName'];
$LastName = $HTTP_POST_VARS['LastName']; 
$Title = $HTTP_POST_VARS['Title']; 
$Institution = $HTTP_POST_VARS['Institution']; 
$EmailFrom = $HTTP_POST_VARS['EmailFrom']; 
$Phone = $HTTP_POST_VARS['Phone']; 
$Address = $HTTP_POST_VARS['Address']; 
$City = $HTTP_POST_VARS['City']; 
$State = $HTTP_POST_VARS['State']; 
$Zip = $HTTP_POST_VARS['Zip']; 
$CoPresenter = $HTTP_POST_VARS['CoPresenter']; 
$ProgramTitle = $HTTP_POST_VARS['ProgramTitle']; 
$ProgramType = $HTTP_POST_VARS['ProgramType']; 
$ProgramDescription = $HTTP_POST_VARS['ProgramDescription']; 
$ProgramOutline = $HTTP_POST_VARS['ProgramOutline']; 
$ProgramTopic = $HTTP_POST_VARS['ProgramTopic']; 
$ProgramAudience = $HTTP_POST_VARS['ProgramAudience']; 
$ExpectedOutcome = $HTTP_POST_VARS['ExpectedOutcome']; 
$Experience = $HTTP_POST_VARS['Experience']; 
$AVEquipment = $HTTP_POST_VARS['AVEquipment']; 


// prepare email body text
$Body = "";
$Body .= "First Name: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "Last Name: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Title: ";
$Body .= $Title;
$Body .= "\n";
$Body .= "Institution: ";
$Body .= $Institution;
$Body .= "\n";
$Body .= "EmailFrom: ";
$Body .= $EmailFrom;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "City: ";
$Body .= $City;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "Zip: ";
$Body .= $Zip;
$Body .= "\n";
$Body .= "CoPresenter: ";
$Body .= $CoPresenter;
$Body .= "\n";
$Body .= "ProgramTitle: ";
$Body .= $ProgramTitle;
$Body .= "\n";
$Body .= "ProgramType: ";
$Body .= $ProgramType;
$Body .= "\n";
$Body .= "ProgramDescription: ";
$Body .= $ProgramDescription;
$Body .= "\n";
$Body .= "ProgramOutline: ";
$Body .= $ProgramOutline;
$Body .= "\n";
$Body .= "ProgramTopic: ";
$Body .= $ProgramTopic;
$Body .= "\n";
$Body .= "ProgramAudience: ";
$Body .= $ProgramAudience;
$Body .= "\n";
$Body .= "ExpectedOutcome ";
$Body .= $ExpectedOutcome;
$Body .= "\n";
$Body .= "Experience: ";
$Body .= $Experience;
$Body .= "\n";
$Body .= "AVEquipment: ";
$Body .= $AVEquipment;
$Body .= "\n";



// send email 
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
// CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE
if ($success){
  print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.html\">";
}
else{
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
}
?

This is the form:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>Conference</title>
    <link rel="shortcut icon" href="/favicon.ico" >
    <link rel="stylesheet" href="css/stylesheet.css" type="text/css" media="screen" /> 

    <link rel="stylesheet" href="css/page.css" type="text/css" media="screen" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script>


<script src="js/jquery.validate.js" type="text/javascript"></script>
<script src="js/cmxforms.js" type="text/javascript"></script>


<script type= "text/javascript">

function changeInputs()
{
var els = document.getElementsByTagName('input');
var elsLen = els.length;
var i = 0;
for ( i=0;i<elsLen;i++ )
{
if ( els[i].getAttribute('type') )
{
if ( els[i].getAttribute('type') == "text" )
els[i].className = 'text';
else
els[i].className = 'button';
}
}
}

$().ready(function() {

    // validate signup form on keyup and submit
    $("#signupForm").validate({
        rules: {
            Firstname: "required",
            Lastname: "required",
            Institution: "required",            
            EmailFrom: {
                required: true,
                email: true
            },

        },
        messages: {
            Firstname: "Please enter your first name",
            Lastname: "Please enter your last name",
            Institution: "Please enter an Institution name",            

            EmailFrom: "Please enter a valid email address"

        }
    });

});

</script>

<style type="text/css">
#signupForm {}
#signupForm label.error {
    margin-left: 5px;
    padding: 3px;
    width: auto;
    display: inline;
    color: #cc0000;
    font-weight: bold;
    background-color: #dedede;
}

.cmxform p
    {
    display: block;
    }

label
    {
    font: bold 14px/18px Arial;
    margin-top: 10px;
    }

label.small
    {
    font: 12px/18px Arial;
    margin-top: 5px;
    }

label,input.text,span
    {
    display: block;
    }

input.checkbox,.inline
    {
    display: inline
    }

input
    {
    margin-right: 5px;
    }

</style>


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>

<?php
include ("google.inc");
?>

</head>

<body>

    <div id="wrapper"><!-- Begin wrapper -->

<?php
include ("header.inc");
?>      
        <hr />

        <div id="outer-space"><!-- Begin outer-space -->

            <div id="hfeed">

                <p id="page-info">Important Information</span>

                <div class="hentry">

                    <div class="entry-meta">
                        <abbr title="#">Conference date: 10/01/10</abbr>
                        <h2 class="entry-title"><a>Directions</a></h2>
                        <em>at</em> <span class="author vcard">Elgin Community College</span>
                    </div>

        <div class="entry-content">

<form name="myform" class="cmxform" id="signupForm" action="proposalengine.php" method="post" enctype="text/plain">
<fieldset>

<label for="FirstName">First Name</label>
<input id="FirstName" name="FirstName" />


<label for="LastName">Last Name</label>
<input id="LastName" name="LastName" />


<label for="Title">Title</label>
<input id="Title" name="Title" />


<label for="Institution">Institution: </label>
<input name="Institution" id="Institution" />


<label for="EmailFrom">Email: </label>
<input id="EmailFrom" name="EmailFrom" class="required email" />


<label for="Phone">Telephone: </label><input name="Phone" id="Phone" type="text" value="" size="10" maxlength="13" />


<label for="Address">Street Address: </label><input name="Address" id="Address" type="text" size="35" maxlength="75" />


<label for="City">City: </label><input name="City" id="City" />

<label class="inline" for="State">State: </label><select class="inline" name="State" id="State">
<option selected value="IL">IL</option>
    <option value="AL">AL</option>
    <option value="AK">AK</option>
    <option value="AZ">AZ</option>
    <option value="AR">AR</option>
    <option value="CA">CA</option>
    <option value="CO">CO</option>
    <option value="CT">CT</option>
    <option value="DE">DE</option>
    <option value="DC">DC</option>
    <option value="FL">FL</option>
    <option value="GA">GA</option>
    <option value="HI">HI</option>
    <option value="ID">ID</option>
    <option value="IN">IN</option>
    <option value="IA">IA</option>
    <option value="KS">KS</option>
    <option value="KY">KY</option>
    <option value="LA">LA</option>
    <option value="ME">ME</option>
    <option value="MD">MD</option>
    <option value="MA">MA</option>
    <option value="MI">MI</option>
    <option value="MN">MN</option>
    <option value="MS">MS</option>
    <option value="MO">MO</option>
    <option value="MT">MT</option>
    <option value="NE">NE</option>
    <option value="NV">NV</option>
    <option value="NH">NH</option>
    <option value="NJ">NJ</option>
    <option value="NM">NM</option>
    <option value="NY">NY</option>
    <option value="NC">NC</option>
    <option value="ND">ND</option>
    <option value="OH">OH</option>
    <option value="OK">OK</option>
    <option value="OR">OR</option>
    <option value="PA">PA</option>
    <option value="RI">RI</option>
    <option value="SC">SC</option>
    <option value="SD">SD</option>
    <option value="TN">TN</option>
    <option value="TX">TX</option>
    <option value="UT">UT</option>
    <option value="VT">VT</option>
    <option value="VA">VA</option>
    <option value="WA">WA</option>
    <option value="WV">WV</option>
    <option value="WI">WI</option>
    <option value="WY">WY</option>
</select>
<label class="inline" for="Zip">Zip Code: </label><input class="inline" name="Zip" id="Zip" type="text" value="" size="5" maxlength="10"  />

<label for="CoPresenter">Co-Presenter(s):</label>
<input type="text" name="CoPresenter" id="CoPresenter" class="required" />



<label for="ProgramTitle">Program Title:</label>
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )</font><br>
                <textarea name="message1" id="ProgramTitle" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message1,this.form.remLen,125);" onKeyUp="textCounter(this.form.message1,this.form.remLen,125);"></textarea>
    <br>

<label for="ProgramType">Program Type:</label>
                <span><input type="checkbox" name="ProgramType" value="ConcurrentSession" />Concurrent Session
                <span><input type="checkbox" name="ProgramType" value="RoundtableDiscussion" />Roundtable Discussion
                <span><input type="checkbox" name="ProgramType" value="InstitutionalInitiativeSession" />Institutional Initiative Session



<label for="ProgramDescription">Program Description:</label></td>
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 600 characters. )</font><br>
                <textarea name="message2" id="ProgramDescription" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message2,this.form.remLen,600);" onKeyUp="textCounter(this.form.message2,this.form.remLen,600);"></textarea>
    <br>


<label for="ProgramOutline">Program Outline:</label></td>
                    <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 1800 characters. )</font><br>
                <textarea name="message3" id="ProgramOutline" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message3,this.form.remLen,1800);" onKeyUp="textCounter(this.form.message3,this.form.remLen,1800);"></textarea>
    <br>



<label for="ProgramTopic">Program Topic:</label>
                <span><input type="checkbox" name="ProgramTopic" value="Common Reading" />Common Reading</span>
                <span><input type="checkbox" name="ProgramTopic" value="Diversity" />Diversity</span>
                <span><input type="checkbox" name="ProgramTopic" value="Nontraditional Students" />Nontraditional Students</span>
                <span><input type="checkbox" name="ProgramTopic" value="Retention" />Retention</span>
                <span><input type="checkbox" name="ProgramTopic" value="Technology" />Technology</span>
                <span><input type="checkbox" name="ProgramTopic" value="Transfer Students" />Transfer Students</span>
                <span><input type="checkbox" name="ProgramTopic" value="Co-curricular programs and activities" />Co-curricular programs and activities</span>
                <span><input type="checkbox" name="ProgramTopic" value="Assessment/Outcomes" />Assessment/Outcomes</span>
                <span><input type="checkbox" name="ProgramTopic" value="Family Members/Parents" />Family Members/Parents</span>
                <span><input type="checkbox" name="ProgramTopic" value="Personal Development" />Personal Development</span>
                <span><input type="checkbox" name="ProgramTopic" value="Research" />Research</span>
                <span><input type="checkbox" name="ProgramTopic" value="Special Populations" />Special Populations</span>
                <span><input type="checkbox" name="ProgramTopic" value="Staff & training for first-year programs/services" />Staff & training for first-year programs/services</span>
                <span><input type="checkbox" name="ProgramTopic" value="Transition" />Transition</span>



<label for="ProgramAudience">Intended Audience:</label>
                <span><input type="checkbox" name="ProgramAudience" value="AcademicAffairsFaculty" />Academic Affairs/Faculty</span>
                <span><input type="checkbox" name="ProgramAudience" value="StudentAffairsDevelopment" />Student Affairs/Development</span>
                <span><input type="checkbox" name="ProgramAudience" value="CommunityCollege" />Community College/2-Year Institutions</span>
                <span><input type="checkbox" name="ProgramAudience" value="GraduateStudents" />Graduate Students</span>
                <span><input type="checkbox" name="ProgramAudience" value="FourYearPublic" />Four-Year Public Institutions</span>
                <span><input type="checkbox" name="ProgramAudience" value="FourYearPrivate" />Four-Year Private Institutions</span>



<label for="ExpectedOutcome">Expected Learning Outcomes:</label>
                <label class="small">List 1-2 expected learning outcomes below. (As a result of attending this session, participants will...)</font></label>
                    <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 400 characters. )<br>
                <textarea name="message4" id="ExpectedOutcome" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message4,this.form.remLen,400);" onKeyUp="textCounter(this.form.message4,this.form.remLen,400);"></textarea>
    <br>



<label for="Experience">Experience:</label>
                <label class="small">List below any experiences you have related to your topic.</font></label>
                    <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br>
                <textarea name="message5" id="Experience" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message5,this.form.remLen,600);" onKeyUp="textCounter(this.form.message5,this.form.remLen,600);"></textarea>
    <br>



<label for="AVEquipment">Audio/Visual Equipment</label>
                <label class="small">List any audio/visual equipment that you will need for this presentation.</label>
    <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )</font><br>
                <textarea name="message6" id="AVEquipment" class="required" wrap="physical" rows="10" cols="35" onKeyDown="textCounter(this.form.message6,this.form.remLen,600);" onKeyUp="textCounter(this.form.message6,this.form.remLen,600);"></textarea>
    <br>

</fieldset>


<input class="submit" type="submit" value="Submit" onsubmit="return check();"/>
<input type="Reset" value="Clear" />

</FORM>         

        </div><!-- end entry content -->

                <div class="separator"></div>


<?php
include ("pagenav.inc");
?>              
            </div>

            <hr />


        </div><!-- End outer-space -->

        <hr />

<?php
include ("leftside.inc");
?>
<!-- this is actually the left sidebar -->

        <hr />

    </div><!-- End wrapper -->

</body>
</html>
  • 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-15T18:57:13+00:00Added an answer on May 15, 2026 at 6:57 pm

    To help with debugging, you can use error_log and print_r:

    error_log(print_r($HTTP_POST_VARS, true), 3, 'error.log');
    error_log("Body = $Body\n", 3, 'error.log');
    

    This will provide a dump of HTTP_POST_VARS as well as the final value of the Body variable (to make sure they are what you think they are.

    Just an FYI, you should use the system superglobal $_POST instead of $HTTP_POST_VARS to get form data.

    Also, make sure to consult the runtime configuration of e-mail in PHP so that you make sure that you can send mail successfully in the first place from the machine running the script.

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

Sidebar

Related Questions

I have tried all the combinations I can think off but this form: class
I have a form that is validated by js when the user submits it.
I have code that opens a dialog, validates, and posts a form when the
I have a nice looking slideup/slidedown jquery form on my website. It sends the
The user sees a web form with a bunch of controls. One of them
I have a form with the following HTML below: <form id=course_edit_form name=course_form action=/courses/save method=post>
I'm basically just trying to submit a form through AJAX and want to show
Ok so i have this problem i am trying to address. I have this
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <title>Validation POC</title> <script
I'm using the ajaxform jQuery plugin to create ajaxed HTML forms and want to

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.