Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Info request fields blank after 5.4 upgrade

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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?

Inforequest.php

Code: Select all
<?php
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>
<tr><td>
<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></td>
  </tr>
</table>
<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">
  <tr>
    <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." />
    </span></td>
  </tr>
  <tr>
    <td width="31%"><span class="style2">First Name: </span></td>
    <td width="69%"><span class="style2">
      <input type="text" input name="first_name" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Middle Initial: </span></td>
    <td><span class="style2">
      <input size="4" type="text" input name="middle_initial" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Last Name:</span></td>
    <td><span class="style2">
      <input type="text" input name="last_name" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Jr./Sr./etc. </span></td>
    <td><span class="style2">
      <input size="4" type="text" input name="name_end" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Email: </span></td>
    <td><span class="style2">
      <input type="text" input name="email" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2"> Address: </span></td>
    <td><span class="style2">
      <input size="30" type="text"  input name="address1" />
    </span></td>
  </tr>
  <tr>
    <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" />
    </span></td>
  </tr>
  <tr>
    <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>
      </select>
    </span></td>
  </tr>
  <tr>
    <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>USA</option>
        <option>Antilles</option>
        <option>Argentina</option>
        <option>Argentina</option>
        <option>Australia</option>
        <option>Austria</option>
        <option>Belgium</option>
        <option>Brazil</option>
        <option>Canada</option>
        <option>Chile/Bolivia</option>
        <option>Croatia</option>
        <option>Cyprus</option>
        <option>Czech</option>
        <option>Denmark</option>
        <option>Ecuador</option>
        <option>Egypt</option>
        <option>El Salvador</option>
        <option>Finland</option>
        <option>France</option>
        <option>Germany</option>
        <option>Grand Canary Is.</option>
        <option>Greece</option>
        <option>Hong Kong</option>
        <option>Hungary</option>
        <option>Iceland</option>
        <option>India</option>
        <option>India</option>
        <option>Israel</option>
        <option>Italy</option>
        <option>Jamaica/Carib</option>
        <option>Jamaica/S.A.</option>
        <option>Japan</option>
        <option>Korea</option>
        <option>Kuwait</option>
        <option>Latvia</option>
        <option>Lebanon</option>
        <option>Mexico</option>
        <option>Netherlands</option>
        <option>New Zealand</option>
        <option>Norway</option>
        <option>Panama</option>
        <option>Peru</option>
        <option>Philippines</option>
        <option>Poland</option>
        <option>Portugal</option>
        <option>Russia</option>
        <option>Saudi Arabia</option>
        <option>Singapore</option>
        <option>Slovakia</option>
        <option>Slovenia</option>
        <option>South Africa</option>
        <option>Spain</option>
        <option>Sweden</option>
        <option>Switzerland</option>
        <option>Tahiti</option>
        <option>Taiwan</option>
        <option>Thailand</option>
        <option>Turkey</option>
        <option>U.K.</option>
        <option>UAE</option>
        <option>Venezuela</option>
        <option>Vietnam</option>
        <option>Vietnam</option>
      </select>
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Zip/Postal Code: </span></td>
    <td><span class="style2">
      <input type="text" input name="zip" size="9" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2"> Business Phone</span></td>
    <td><span class="style2">
      <input type="text" input name="bus_phone" />
      Ext:
      <input type="text" size="5" input name="extension" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2"> Cell Phone</span></td>
    <td><span class="style2">
      <input type="text" input name="cell_phone" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Home Phone: </span></td>
    <td><span class="style2">
      <input type="text" input name="home_phone" />
    </span></td>
  </tr>
  <tr>
    <td><span class="style2">Fax Number: </span></td>
    <td><span class="style2">
      <input type="text" input name="Fax_Number" />
    </span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<br>
<center>
<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);

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

</td>
  <td>&nbsp;</td>
</tr>
</table>
        </div></td>
      
<?php include ("footer.php"); ?>


handlecontact.php
Code: Select all
<?PHP
require_once('recaptchalib.php');
$privatekey = "6Lcu2roSAAAAAJkYBvEn22ByzEHFeKHL5JTx32LB ";
$resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

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 = "info@aerostar-owners.com";
$emailto2 = "joel.champlin@gmail.com";



// 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");
exit;
} else {
echo "<h2>Please press the back button the captcha you entered did not match\n";
}
?>
jchamplin
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue May 27, 2014 8:29 am

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.