2012-09-14 68 views
-5

請幫忙,我工作的地方沒有內部技術,他們依賴我的需求。我們有一個在線填寫的應用程序,它將應用程序的結果通過電子郵件發送到一個電子郵件地址。我們的網站主機服務器godaddy最近從PHP4(PHP 5.3)切換到PHP5,現在應用程序仍然顯示在網站上,但是當他們提交應用程序時,它會通過電子郵件向我們發送一個空白應用程序而不是完成的應用程序。我打電話給godaddy,他們說我們傳輸數據的代碼或腳本與PHP5不兼容。我已經粘貼了下面的代碼,如果有人知道我必須改變以實現這個目標,我會非常感激他們,並且對我們的業務非常有幫助。以下是我需要幫助的代碼。 謝謝你的任何見解,您可以提供從php4轉換到php5

<!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> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Apply Online</title> 
<link href="../css/default.css" rel="stylesheet" type="text/css" /> 
<style type="text/css"> 
<!-- 
.style1 { 
font-size: 10px; 
font-style: italic; 
} 
--> 
</style> 
</head> 

<body> 
<?php 
foreach ($_POST as $k=>$v) {$k = $v;} 

$date = date(r); 
?> 

<table width="810" border="0" align="center" cellpadding="0" cellspacing="0"> 
<tr> 
<td colspan="3" align="left" valign="top"><img src="../Images/GIF/Peterson_Cleaning_Logo_200x91.gif" alt="logo" width="200" height="91" /></td> 
<td colspan="3" align="right" valign="middle">Peterson Cleaning, Inc.<br /> 
    843 North Madison Street<br /> 
    Rockford, IL. 61107<br /> 
    Phone # 815.961.1300<br /> 
Fax # 815.961.1190</td> 
</tr> 
<tr> 
<td colspan="6" >&nbsp;</td> 
</tr><tr class="cell_title"> 
<td colspan="6" align="left" valign="top" class="cell_title"><p>&nbsp;</p> 
<p>Thank you, your application has been submitted.</p> 
<p>&nbsp;</p></td> 
</tr> 
<tr> 
<td colspan="6" >&nbsp;</td> 
</tr> 

</table> 
<?php 
$to = "[email protected]"; 
$subject = "$fname $mname $lname's Job Application"; 
$message = "<table width='810' border='0' align='center' cellpadding='0' cellspacing='0'> 
<td colspan='3' align='left' valign='top'><img    

src='http://www.petersoncleaning.com/Images/GIF/Peterson_Cleaning_Logo_200x91.gif' alt='logo' width='200'     

height='91' /></td> 
<td colspan='3' align='right' valign='middle'>Peterson Cleaning, Inc.<br /> 
    843 North Madison Street<br /> 
    Rockford, IL. 61107<br /> 
    Phone # 815.961.1300<br /> 
Fax # 815.961.1190</td> 
</tr> 
<tr> 
<td colspan='6'>&nbsp;</td> 
<tr> 
<td colspan='6' class='cell_title'><strong>Application Information </strong></td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'> First Name: 
    <strong> $fname </strong> 
    <br /> 
Middle Name: 
<strong> $mname </strong> 
<br /> 
Last Name: 
<strong> $lname </strong> 
<br /></td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $address </strong> 
Apt number 
<strong> $apartment_number </strong> 
<br /> 
City: 
<strong> $city </strong> 
State: 
<strong> $state </strong> 
Zip: 
<strong> $zip </strong> </td> 
</tr> 
<tr><td colspan='3' class='cell_body_center_align'>Home Phone #: 
<strong> $home_phone </strong> </td> 
<td colspan='3' class='cell_body_center_align'><span class='cell_body_left_align'>Cell Phone #: 
<strong> $cell_phone </strong> 
</span></td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_center_align'>Date Availible: <span class='cell_body_right_align'><span  

class='cell_body_left_align'> 
<strong> $date_availible </strong> 
</span></span></td> 
<td colspan='2' class='cell_body_center_align'>Social Security #: <span class='cell_body_left_align'><span  

class='cell_body_right_align'> 
<strong> $soc_sec </strong> 
</span></span></td> 
<td colspan='2' class='cell_body_center_align'>Desired Salary: <span class='cell_body_left_align'><span 

class='cell_body_right_align'> 
<strong> $desired_salary </strong> 
</span></span></td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_center_align'>Position Applied for: <span class='cell_body_left_align'> <strong> 

$postion_applied_for </strong>  </span></td> 
<td colspan='3' class='cell_body_center_align'>City Applied for: <span class='cell_body_left_align'>  

<strong>   
$city_applied_for </strong>  </span></td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_center_align'>Email Address:  
    <strong> $email </strong> 
<span class='style1'>(optional) </span></td> 
<td colspan='3' class='cell_body_center_align'>Birthdate: 
    <strong> $birthdate </strong> 
<span class='style1'>(optional) </span></td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_center_align'><p>Are you a citizen of the United States? 
    <br /><strong> $us_citizen </strong> 
</p></td> 
<td colspan='3' class='cell_body_center_align'><p>If no, are you authorized to work in the U.S.? <br /><strong>  

$authorized_in_us </strong> 
</p></td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_center_align'>Have you ever worked for this company? <br /><strong> $have_worked_for </strong> </td> 
<td colspan='3' class='cell_body_center_align'>If so, when? 
<strong> $worked_for_peterson_when </strong> </td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_center_align'>Have you ever been convicted of a felony? <br /><strong> $felony  

</strong> </td> 
<td width='135' class='cell_body_center_align'>&nbsp;</td> 
<td width='135' class='cell_body_center_align'>&nbsp;</td> 
<td width='135' class='cell_body_center_align'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>If Yes, Explain: 
<strong> $felony_because </strong> </td> 
</tr> 
<tr> 
<td colspan='6'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>Education</td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>High School: 
<strong> $hs </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $hs_address </strong> 
<br /> 
City: 
<strong> $hs_city </strong> 
State: 
<strong> $hs_state </strong> 
Zip: 
<strong> $hs_zip </strong>  </td> 
</tr> 
<tr> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $hs_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $hs_to </strong> </td> 
<td colspan='2' class='cell_body_center_align'>Did you graduate? &nbsp;&nbsp;&nbsp;<strong> $graduate_hs  

</strong>  </td> 
<td colspan='2' class='cell_body_right_align'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>College: 
<strong> $college </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $college_address </strong> 
<br /> 
City: 
    <strong> $college_city </strong> 
    State: 
    <strong> $college_state </strong> 
    Zip: 
<strong> $college_zip </strong>  </td> 
</tr> 
<tr> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $college_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $college_to </strong> </td> 
<td colspan='2' class='cell_body_center_align'>Did you graduate? &nbsp;&nbsp;&nbsp;<strong> $graduate_college 

</strong> </td> 
<td colspan='2' class='cell_body_right_align'>Degree: 
<strong> $college_degree </strong> </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Other: 
<strong> $other </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $other_address </strong> 
    <br /> 
    City: 
    <strong> $other_city </strong> 
    State: 
    <strong> $other_state </strong> 
    Zip: 
<strong> $other_zip </strong>  </td> 
</tr> 
<tr> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $other_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $other_to </strong> </td> 
<td colspan='2' class='cell_body_center_align'>Did you graduate? &nbsp;&nbsp;&nbsp;<strong> $graduate_other 

</strong> </td> 
<td colspan='2' class='cell_body_right_align'>Degree: 
<strong> $other_degree </strong> </td> 
</tr> 
<tr> 
<td colspan='6'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>References</td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_left_align'><em>Please list three references </em></td> 
<td width='135' class='cell_body'>&nbsp;</td> 
<td width='135' class='cell_body'>&nbsp;</td> 
<td width='135' class='cell_body'>&nbsp;</td> 
<td width='135' class='cell_body'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_left_align'>Full Name: 
<strong> $ref1_name </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Relationship: 
<strong> $ref1_relation </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Phone #: 
<strong> $ref1_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $ref1_company </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $ref1_address </strong> 
    <br /> 
    City: 
    <strong> $ref1_city </strong> 
    State: 
    <strong> $ref1_state </strong> 
    Zip: 
<strong> $ref1_zip </strong>  </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_left_align'>Full Name: 
<strong> $ref2_name </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Relationship: 
<strong> $ref2_relation </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Phone #: 
<strong> $ref2_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $ref2_company </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $ref2_address </strong> 
<br /> 
City: 
<strong> $ref2_city </strong> 
State: 
<strong> $ref2_state </strong> 
Zip: 
<strong> $ref2_zip </strong>  </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_left_align'>Full Name: 
<strong> $ref3_name </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Relationship: 
<strong> $ref3_relation </strong> </td> 
<td colspan='2' class='cell_body_left_align'>Phone #: 
<strong> $ref3_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $ref3_company </strong> </td> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $ref3_address </strong> 
<br /> 
City: 
<strong> $ref3_city </strong> 
State: 
<strong> $ref3_state </strong> 
Zip: 
<strong> $ref3_zip </strong>  </td> 
</tr> 
<tr> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>Previous Employment </td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $pe1_company </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Supervisor: 
<strong> $pe1_suporvisor </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Phone #: 
<strong> $pe1_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $pe1_address </strong>   
<br /> 
City: 
<strong> $pe1_city </strong> 
State: 
<strong> $pe1_state </strong> 
Zip: 
<strong> $pe1_zip </strong>  </td> 
<td width='135' class='cell_body_center_align'>Starting Salary: 
<strong> $pe1_starting </strong> </td> 
<td width='135' class='cell_body_center_align'>Ending Salary: 
<strong> $pe1_ending </strong> </td> 
</tr> 
    <tr> 
    <td colspan='6' class='cell_body_center_align'>Responsibilities: 
    <strong> $pe1_responsibilities </strong> </td> 
    </tr> 
    <tr> 
    <td width='135' class='cell_body_right_align'>From: 
    <strong> $pe1_from </strong> </td> 
    <td width='135' class='cell_body_right_align'>To: 
    <strong> $pe1_to </strong> </td> 
    <td colspan='4' class='cell_body_center_align'>Reason for Leaving: 
    <strong> $pe1_reason </strong> </td> 
    </tr> 
    <tr> 
<td colspan='5' class='cell_body_center_align'>May we contact your previous supervisor for a reference?<strong> 

$prev_employer1_can_we_contact </strong> </td> 
<td width='135' class='cell_body'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $pe2_company </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Supervisor: 
<strong> $pe2_suporvisor </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Phone #: 
<strong> $pe2_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $pe2_address </strong> 
<br /> 
City: 
<strong> $pe2_city </strong> 
State: 
<strong> $pe2_state </strong> 
Zip: 
<strong> $pe2_zip </strong>  </td> 
<td width='135' class='cell_body_center_align'>Starting Salary: 
<strong> $pe2_starting </strong> </td> 
<td width='135' class='cell_body_center_align'>Ending Salary: 
<strong> $pe2_ending </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>Responsibilities: 
<strong> $pe2_responsibilities </strong> </td> 
</tr> 
<tr> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $pe2_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $pe2_to </strong> </td> 
<td colspan='4' class='cell_body_center_align'>Reason for Leaving: 
<strong> $pe2_reason </strong> </td> 
</tr> 
<tr> 
<td colspan='5' class='cell_body_center_align'>May we contact your previous supervisor for a reference? <strong> 

$prev_employer2_can_we_contact </strong> </td> 
<td width='135' class='cell_body'>&nbsp;</td> 
</tr> 

<tr> 
<td colspan='2' class='cell_body_right_align'>Company: 
<strong> $pe3_company </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Supervisor: 
<strong> $pe3_suporvisor </strong> </td> 
<td colspan='2' class='cell_body_right_align'>Phone #: 
<strong> $pe3_phone </strong> </td> 
</tr> 
<tr> 
<td colspan='4' class='cell_body_right_align'> Address: 
<strong> $pe3_address </strong> 
<br /> 
City: 
<strong> $pe3_city </strong> 
State: 
<strong> $pe3_state </strong> 
Zip: 
<strong> $pe3_zip </strong>  </td> 
<td width='135' class='cell_body_center_align'>Starting Salary: 
<strong> $pe3_starting </strong> </td> 
<td width='135' class='cell_body_center_align'>Ending Salary: 
<strong> $pe3_ending </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>Responsibilities: 
<strong> $pe3_responsibilities </strong> </td> 
</tr> 
<tr> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $pe3_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $pe3_to </strong> </td> 
<td colspan='4' class='cell_body_center_align'>Reason for Leaving: 
<strong> $pe3_reason </strong> </td> 
</tr> 
<tr> 
<td colspan='5' class='cell_body_center_align'>May we contact your previous supervisor for a reference?<strong> $prev_employer3_can_we_contact </strong> </td> 
<td width='135' class='cell_body'>&nbsp;</td> 
</tr> 

<tr> 
<td colspan='6'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>Military Service </td> 
</tr> 
<tr> 
<td colspan='4' class='cell_body_left_align'>Branch: 
<strong> $military_branch </strong> </td> 
<td width='135' class='cell_body_right_align'>From: 
<strong> $military_from </strong> </td> 
<td width='135' class='cell_body_right_align'>To: 
<strong> $military_to </strong> </td> 
</tr> 
<tr> 
<td colspan='3' class='cell_body_left_align'>Rank at Discharge: 
<strong> $rank </strong> </td> 
<td colspan='3' class='cell_body_left_align'>Type of Discharge: 
<strong> $type_of_discharge </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>If other than honorable, explain: 
<strong> $textfield6 </strong> </td> 
</tr> 
<tr> 
<td colspan='6'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>Questionaire</td> 
</tr> 
<tr> 
<td colspan='4' class='cell_body_left_align'><em>Please answer each question to the best of your ability. </em></td> 
<td width='135' class='cell_body'>&nbsp;</td> 
<td width='135' class='cell_body'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6'><p class='cell_body_left_align'>Do you have any physical Condition that may limit your ability to perform the job for which you have applied?<br /><strong> $has_physical_condition </strong> 
    If yes, please explain: 
    <strong> $yes_physical_condition </strong> 
/td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>Does heat, standing on your feet, or lifting cause you any difficulties?<br /><strong> $standing </strong> 
If yes, please explain: 
<strong> $yes_standing </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>My number one reason for seeking employment in a cleaning buisness is:<br /> <strong> $reasond_for_seeking_employment </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>I am applying to Peterson Cleaning, Inc. because:<br /> <strong> $peterson_cleaning </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>My friends describe me as:<br /> <strong> $friends_describe_me_as </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>My previous (or current) employer describes me as:<br /> 
<strong> $previous_employer_describes_me_as </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>When considering dependability, thouroughness, or energy level I feel my strongest area is: <br /> 
<strong> $strongest_area </strong> </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_left_align'>When it comes to getting along with fellow employees I can always be counted on to: <br /> 
<strong> $fellow_employees </strong> </td> 
</tr> 
<tr> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_title'>Disclaimer and Agreement </td> 
</tr> 
<tr class='cell_body_left_align'> 
<td colspan='6'><p>I certify that my answers are true and complete to the best of my knowledge.</p> 
<p>If this application leads to employment, I understand that false or misleading information in my application or interview may result in my release.</p></td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>&nbsp;</td> 
</tr> 
<tr> 
<td width='135' class='cell_body_center_align'> <strong> $contact_previous_employers </strong> </td> 
<td colspan='5' class='cell_body_left_align'>By checking the box to the left, I herby authorize and request any present or former employer, school, police department, financial institution or other person having personal knowledge about me, to furnish bearer (Peterson Cleaning, Inc.) with any and all information in their possession regarding me in connection with an application for employment. A printout or photocopy of this authorization may be accepted with the same authority as the original, and I specifically waive any written notice from any present or former employer who may provide information based upon this authorized request. I understand this authorization is to be part of the submitted application that I filled out. </td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>By pressing the submit button, you agree to the terms expressed above.</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>&nbsp;</td> 
</tr> 
<tr> 
<td colspan='6' class='cell_body_center_align'>Submitted <strong> $date </strong> </td> 
</tr> 
<tr> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
<td width='135'>&nbsp;</td> 
</tr> 
</table>"; 
$headers = "MIME-Version: 1.0\r\n"; 
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
$headers .= "Content-Transfer-Encoding: 7bit\r\n"; 
$headers .= "From: [email protected]\r\n"; 
mail($to, $subject, $message , $headers); 
?> 
</body> 
</html> 
+0

表格佈局。我的眼睛流血了。 –

+0

@MadaraUchiha不能...回答...問題... – Erik

+0

我會聘請一名程序員,並轉儲GoDaddy。 – woz

回答

1

我懷疑你以前的配置使用register globals

有一個大紅色的框說,這是在5.4過時。這就是爲什麼你的郵件程序不再包含某人輸入的變量。

使用register globals,PHP根據輸入的值生成變量;而不是$_REQUEST["myname"],您可以使用$myname

由於它不再可用,您將不得不編輯腳本。對於每個變量,您必須將其從$variable編輯爲$_REQUEST["variable"]。你需要編輯的東西很多,看起來像 - 我建議編輯第一對,並在提交表單時看看它們是否填充,以防萬一它是其他的東西。

我肯定也會做woz建議的,並聘請程序員。可能有更多的事情將被打破。

+0

謝謝andrewsi我現在要試試這個。 – user1669912

+0

謝謝Andrewsi,我將$變量改爲$ _REQUEST [「variable」],信息現在變成tru。我必須爲每個條目都更改,因此需要一段時間,但是我感謝您的意見和理解。 – user1669912