Info request fields blank after 5.4 upgrade

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue May 27, 2014 8:29 am

Info request fields blank after 5.4 upgrade

Postby jchamplin » Tue May 27, 2014 10:45 am

I manage a php website which has an Information Request form. It is supposed to collect the information and simply email that information to two addresses. It worked fine until my host site upgraded to php 5.4.

Now it emails the name of the field but no data. All the fields are blank. So I know the email is working but I cannot tell where the problem is. It is probably something simple. Can anyone help?


Code: Select all

include_once ("header.php");
include_once ("left.php");
        <td valign="top"><div  style="padding: 10px 5px 5px 15px; margin: 5px 5px 5px 5px;"><table bgcolor="white" width=100% cellspacing=0 cellpadding=5 border=0>
<form action="handlecontact.php" method="post" input name="inforequest" id="inforequest">
<input type="hidden" input name="subject"  value="Aerostar Owners Info Request">
<span class="style1"><big><big>INFORMATION REQUEST</big></big></span>
<br />
<br />
<span class="style2">
 I would like to receive information:
 <input type="radio" input name="info_by" value="mail">
 via mail
                                      <input type="radio" input name="Info_by" value="email">
                                      via email                      </span>
<table cellspacing=0 cellpadding=0 border=0 width="100%">
<tr><td><span class="style2"><br />
    Type your question here:<br />
  </span>  <span class="style2">
    <textarea wrap="physical" input name="comments" cols="40" rows="8"></textarea>
<span class="style2"><br>
</span><span class="style1"><big><big>PERSONAL INFORMATION</big></big></span><br />
<br />
<table width="100%" border="0" cellpadding="1" cellspacing="1">
    <td colspan="2"><span class="style2">Mr.
      <input type="radio" input name="mr_ms_dr" value="Mr." />
      / Ms.
      <input type="radio" input name="mr_ms_dr" value="Ms." />
      / Dr.
      <input type="radio" input name="mr_ms_dr" value="Dr." />
    <td width="31%"><span class="style2">First Name: </span></td>
    <td width="69%"><span class="style2">
      <input type="text" input name="first_name" />
    <td><span class="style2">Middle Initial: </span></td>
    <td><span class="style2">
      <input size="4" type="text" input name="middle_initial" />
    <td><span class="style2">Last Name:</span></td>
    <td><span class="style2">
      <input type="text" input name="last_name" />
    <td><span class="style2">Jr./Sr./etc. </span></td>
    <td><span class="style2">
      <input size="4" type="text" input name="name_end" />
    <td><span class="style2">Email: </span></td>
    <td><span class="style2">
      <input type="text" input name="email" />
    <td><span class="style2"> Address: </span></td>
    <td><span class="style2">
      <input size="30" type="text"  input name="address1" />
    <td><span class="style2"> City:</span></td>
    <td><span class="style2">
      <input type="text" input name="city" />
      <input size="30" type="text" input name="address2" />
    <td><span class="style2">State/Province: </span></td>
    <td><span class="style2">
      <select input name="state_province" size="1">
        <option value="" selected="selected">Select State/Prov. </option>
        <option value="AL">Alabama </option>
        <option value="AK">Alaska </option>
        <option value="AB">Alberta </option>
        <option value="AZ">Arizona </option>
        <option value="AR">Arkansas </option>
        <option value="BC">British Columbia </option>
        <option value="CA">California </option>
        <option value="CO">Colorado </option>
        <option value="CT">Connecticut </option>
        <option value="DC">D.C. </option>
        <option value="DE">Delaware </option>
        <option value="FL">Florida </option>
        <option value="GA">Georgia </option>
        <option value="HI">Hawaii </option>
        <option value="ID">Idaho </option>
        <option value="IL">Illinois </option>
        <option value="IN">Indiana </option>
        <option value="IA">Iowa </option>
        <option value="KS">Kansas </option>
        <option value="KY">Kentucky </option>
        <option value="LA">Louisiana </option>
        <option value="ME">Maine </option>
        <option value="MB">Manitoba </option>
        <option value="MD">Maryland </option>
        <option value="MA">Massachusetts </option>
        <option value="MI">Michigan </option>
        <option value="MN">Minnesota </option>
        <option value="MS">Mississippi </option>
        <option value="MO">Missouri </option>
        <option value="MT">Montana </option>
        <option value="NE">Nebraska </option>
        <option value="NV">Nevada </option>
        <option value="NB">New Brunswick </option>
        <option value="NH">New Hampshire </option>
        <option value="NJ">New Jersey </option>
        <option value="NM">New Mexico </option>
        <option value="NY">New York </option>
        <option value="NF">Newfoundland </option>
        <option value="NC">North Carolina </option>
        <option value="ND">North Dakota </option>
        <option value="NT">Northwest Terr. </option>
        <option value="NS">Nova Scotia </option>
        <option value="OH">Ohio </option>
        <option value="OK">Oklahoma </option>
        <option value="ON">Ontario </option>
        <option value="OR">Oregon </option>
        <option value="PA">Pennsylvania </option>
        <option value="PE">Prince Edward Isl. </option>
        <option value="QC">Qu&eacute;bec </option>
        <option value="RI">Rhode Island </option>
        <option value="SK">Saskatchewan </option>
        <option value="SC">South Carolina </option>
        <option value="SD">South Dakota </option>
        <option value="TN">Tennessee </option>
        <option value="TX">Texas </option>
        <option value="UT">Utah </option>
        <option value="VT">Vermont </option>
        <option value="VA">Virginia </option>
        <option value="WA">Washington </option>
        <option value="WV">West Virginia </option>
        <option value="WI">Wisconsin </option>
        <option value="WY">Wyoming </option>
        <option value="YT">Yukon </option>
    <td><span class="style2"> Country:</span></td>
    <td><span class="style2">
      <select size="1" input name="country">
        <option value="" selected="selected">Select a Country</option>
        <option>El Salvador</option>
        <option>Grand Canary Is.</option>
        <option>Hong Kong</option>
        <option>New Zealand</option>
        <option>Saudi Arabia</option>
        <option>South Africa</option>
    <td><span class="style2">Zip/Postal Code: </span></td>
    <td><span class="style2">
      <input type="text" input name="zip" size="9" />
    <td><span class="style2"> Business Phone</span></td>
    <td><span class="style2">
      <input type="text" input name="bus_phone" />
      <input type="text" size="5" input name="extension" />
    <td><span class="style2"> Cell Phone</span></td>
    <td><span class="style2">
      <input type="text" input name="cell_phone" />
    <td><span class="style2">Home Phone: </span></td>
    <td><span class="style2">
      <input type="text" input name="home_phone" />
    <td><span class="style2">Fax Number: </span></td>
    <td><span class="style2">
      <input type="text" input name="Fax_Number" />
<div align="left"><span class="style2">
      <?php require_once('recaptchalib.php');

$publickey = "6Lcu2roSAAAAAKV_G6eJww3qhEC6dkNU4AhVgrWq"; // you got this from the signup page

echo recaptcha_get_html($publickey);

                  <div align="center">
                     <p><span class="style2">
                        <input name="button" type="submit" value="Send Query">
<INPUT TYPE=RESET VALUE="Reset Fields">                        </span>

<?php include ("footer.php"); ?>


Code: Select all

$privatekey = "6Lcu2roSAAAAAJkYBvEn22ByzEHFeKHL5JTx32LB ";
$resp = recaptcha_check_answer ($privatekey,

if ($resp->is_valid) {
# This section sends you a notification email when
# the form is used

// Your email address (for copies to be sent to you)
$emailto1 = "";
$emailto2 = "";

// Your email subject text
$esubject = "Aerostar Owners Contact Form From ".$first_name." ";

// The email text for copies sent to you
$emailtext = "
Info By: ".$info_by."
Comments: ".$comments."
Mr_Ms_Dr: ".$mr_ms_dr."
First Name: ".$first_name."
Middle Initial: ".$middle_initial."
Last Name: ".$last_name."
Name End: ".$name_end."
Email: ".$email."
Address1: ".$address1."
Address2: ".$address2."
City: ".$city."
State Province: ".$state_province."
Country: ".$country."
Zip: ".$zip."
Business Phone: ".$bus_phone."
Extension: ".$extension."
Home Phone: ".$home_phone."
Cell Number: ".$cell_phone."
Fax Number: ".$fax_number."
# Send the email to you
@mail("$emailto1", $esubject, $emailtext, "From: $first_name.");
@mail("$emailto2", $esubject, $emailtext, "From: $first_name.");

## This section sends to the recipients

// Target page after successful submission
$thankyoupage = ;

//  Change the subject text below to suit

header("Location: $thankyoupage");
} else {
echo "<h2>Please press the back button the captcha you entered did not match\n";

Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 7 guests