Jump to content

Recommended Posts

I don't get it since this form was working fine yesterday.  Now today I get this error.

"No input file specified."

Any idea why?

 

Form.htm


<html>
<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link type="text/css" rel="stylesheet" href="css/estimate_form.css"/>
</head>
<body style="background: #efe5d0" >
<div id="container" style="	margin-left:200px; margin-right:auto;">

<form method="post" action="/estimate_processTest.php" target="_blank" >

	<fieldset style="text-align:right; width:500px">
				<legend>Contact Info</legend> 
  				
    				Full Name<input type="text" name="name" size="35"><br />    			
  					Email Address<input type="text" name="email" size="35"><br />
				Home Phone<input type="text" name="homePhone" size="35"><br />
				Business Phone<input type="text" name="businessPhone" size="35"><br />
			    Best time to contact you<input type="radio" name="bestTimeToContact" value="AM">
		            AM  			         
		            <input type="radio" name="bestTimeToContact" value="PM">
	            	PM 			
					<input type="radio" name="bestTimeToContact" value="Anytime">
					Anytime<br />
				Prefered Methods of Contact (Check all that apply)<br />
			            <input type="checkbox" name="contactByHomePhone">Home Phone  
			            <input type="checkbox" name="contactByBusinessPhone">Business Phone
			            <input type="checkbox" name="contactByEmail">Email

	</fieldset>
	<br />
	<fieldset style="text-align:right; width:500px">
				<legend>Pickup Info</legend>
				City<input type="text" name="pickupCity" size="35"><br />
				State <select name="pickupState" size="1">
		              <option value="" selected>--Choose State--</option>
		              <option>AK</option>
		              <option>AL</option>
		              <option>AR</option>
		              <option>AZ</option>
		              <option>CA</option>
		              <option>CO</option>
		              <option>CT</option>
		              <option>DC</option>
		              <option>DE</option>
		              <option>FL</option>
		              <option>GA</option>
		              <option>HI</option>
		              <option>IA</option>
		              <option>ID</option>
		              <option>IL</option>
		              <option>IN</option>
		              <option>KS</option>
		              <option>KY</option>
		              <option>LA</option>
		              <option>MA</option>
		              <option>MD</option>
		              <option>ME</option>
		              <option>MI</option>
		              <option>MN</option>
		              <option>MO</option>
		              <option>MS</option>
		              <option>MT</option>
		              <option>NC</option>
		              <option>ND</option>
		              <option>NE</option>
		              <option>NH</option>
		              <option>NJ</option>
		              <option>NM</option>
		              <option>NV</option>
		              <option>NY</option>
		              <option>OH</option>
		              <option>OK</option>
		              <option>OR</option>
		              <option>PA</option>
		              <option>RI</option>
		              <option>SC</option>
		              <option>SD</option>
		              <option>TN</option>
		              <option>TX</option>
		              <option>UT</option>
		              <option>VA</option>
		              <option>VI</option>
		              <option>VT</option>
		              <option>WA</option>
		              <option>WI</option>
		              <option>WV</option>
		              <option>WY</option>
		              <option>NONE</option>
		            </select><br />
					Zip Code
			            <input type="text" name="pickupZip" size="12">
		</fieldset>	
			<br />
		<fieldset style="text-align:right; width:500px">
			<legend>Destination Info</legend>
				City<input type="text" name="destinationCity" size="35"><br />
				State <select name="destinationState" size="1">
		              <option value="" selected>--Choose State--</option>
		              <option>AK</option>
		              <option>AL</option>
		              <option>AR</option>
		              <option>AZ</option>
		              <option>CA</option>
		              <option>CO</option>
		              <option>CT</option>
		              <option>DC</option>
		              <option>DE</option>
		              <option>FL</option>
		              <option>GA</option>
		              <option>HI</option>
		              <option>IA</option>
		              <option>ID</option>
		              <option>IL</option>
		              <option>IN</option>
		              <option>KS</option>
		              <option>KY</option>
		              <option>LA</option>
		              <option>MA</option>
		              <option>MD</option>
		              <option>ME</option>
		              <option>MI</option>
		              <option>MN</option>
		              <option>MO</option>
		              <option>MS</option>
		              <option>MT</option>
		              <option>NC</option>
		              <option>ND</option>
		              <option>NE</option>
		              <option>NH</option>
		              <option>NJ</option>
		              <option>NM</option>
		              <option>NV</option>
		              <option>NY</option>
		              <option>OH</option>
		              <option>OK</option>
		              <option>OR</option>
		              <option>PA</option>
		              <option>RI</option>
		              <option>SC</option>
		              <option>SD</option>
		              <option>TN</option>
		              <option>TX</option>
		              <option>UT</option>
		              <option>VA</option>
		              <option>VI</option>
		              <option>VT</option>
		              <option>WA</option>
		              <option>WI</option>
		              <option>WV</option>
		              <option>WY</option>
		              <option>NONE</option>
		            </select><br />
					Zip Code
			            <input type="text" name="destinationZip" size="12">							
		</fieldset>
			<br />
		<fieldset style="text-align:right; width:500px">
			<legend>Moving Date</legend>
				<select name="moveMonth" class="inputBox" id="MoveMonth" onChange="setMonthDays()">
	              <option value="0" selected>Month      </option>
	              <option value="1">Jan</option>
	              <option value="2">Feb</option>
	              <option value="3">Mar</option>
	              <option value="4">Apr</option>
	              <option value="5">May</option>
	              <option value="6">Jun</option>
	              <option value="7">Jul</option>
	              <option value="8">Aug</option>
	              <option value="9">Sep</option>
	              <option value="10">Oct</option>
	              <option value="11">Nov</option>
	              <option value="12">Dec</option>
	            </select>
	            <select name="moveDay" class="inputBox" id="MoveDay" >
	              <OPTION value="0" selected>Day  </OPTION>
	              <OPTION value=1>1</OPTION>
	              <OPTION value=2>2</OPTION>
	              <OPTION value=3>3</OPTION>
	              <OPTION value=4>4</OPTION>
	              <OPTION value=5>5</OPTION>
	              <OPTION value=6>6</OPTION>
	              <OPTION value=7>7</OPTION>
	              <OPTION value=8>8</OPTION>
	              <OPTION value=9>9</OPTION>
	              <OPTION value=10>10</OPTION>
	              <OPTION value=11>11</OPTION>
	              <OPTION value=12>12</OPTION>
	              <OPTION value=13>13</OPTION>
	              <OPTION value=14>14</OPTION>
	              <OPTION value=15>15</OPTION>
	              <OPTION value=16>16</OPTION>
	              <OPTION value=17>17</OPTION>
	              <OPTION value=18>18</OPTION>
	              <OPTION value=19>19</OPTION>
	              <OPTION value=20>20</OPTION>
	              <OPTION value=21>21</OPTION>
	              <OPTION value=22>22</OPTION>
	              <OPTION value=23>23</OPTION>
	              <OPTION value=24>24</OPTION>
	              <OPTION value=25>25</OPTION>
	              <OPTION value=26>26</OPTION>
	              <OPTION value=27>27</OPTION>
	              <OPTION value=28>28</OPTION>
	              <OPTION value=29>29</OPTION>
	              <OPTION value=30>30</OPTION>
	              <OPTION value=31>31</OPTION>
	            </SELECT>
	            <select name="moveYear" class="inputBox" id="MoveYear" >
	              <OPTION value="0" selected>Year  </OPTION>
	              <OPTION value=2007>2008</OPTION>
	              <OPTION value=2008>2009</OPTION>
	            </SELECT><br />

	</fieldset>
	<br />
	<fieldset style="text-align:right; width:500px">
		<legend>Size of Move</legend>
			Estimated Weight. (If Known)<input type="text" name="estimateWeight" size="35"><br />
			Number of Furnished Rooms<input type="text" name="numberFurnishedRooms" size="4">
	</fieldset>
	<br />
	<fieldset style="text-align:right; width:500px">
		<legend>Other Comments or Requests</legend>
			<textarea name="otherCommentsOrRequests" cols="40" rows="2"></textarea>
	</fieldset>
	<br />
	<fieldset style="text-align:right; width:500px">
		<legend>Submit Estimate Request Form</legend>
	<input type="submit" value="Send Information" style="float:right;">	
</form>		
</div>  
</body>
</html>

 

Form Processor

<?php
error_reporting(E_ALL);

/* Set e-mail recipient */
$myemail  = "myemail@cox.net";

/* Check all form inputs using check_input function */
$name = check_input($_POST['name'] , "Enter your name");
$email = check_input($_POST['email'] , "Enter your email");

$homePhone = $_POST['homePhone'];
$businessPhone = $_POST['businessPhone'];

$bestTimeToContact = $_POST['bestTimeToContact'];

$contactByHomePhone = $_POST['contactByHomePhone'];
$contactByBusinessPhone = $_POST['contactByBusinessPhone'];
$contactByEmail = $_POST['contactByEmail'];

$pickupCity = $_POST['pickupCity'];
$pickupState = $_POST['pickupState'];
$pickupZip = $_POST['pickupZip'];

$destinationCity = $_POST['destinationCity'];
$destinationState = $_POST['destinationState'];
$destinationZip = $_POST['destinationZip'];

$moveMonth = $_POST['moveMonth'];
$moveDay = $_POST['moveDay'];
$moveYear = $_POST['moveYear'];

$estimateWeight = $_POST['estimateWeight'];
$numberFurnishedRooms = $_POST['numberFurnishedRooms'];

$otherCommentsOrRequests = $_POST['otherCommentsOrRequests'];



/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
    show_error("E-mail address not valid");
}
/* Let's prepare the message for the e-mail */
$message = "Moving Solutions

Your contact form has been submitted by:

Name: $name
E-mail: $email

Home Phone: $homePhone
Business Phone: $businessPhone


The best time to contact $name is $bestTimeToContact 
Contact by $contactByHomePhone $contactByBusinessPhone $contactByEmail

Moving from:
$pickupCity 
$pickupState
$pickupZip

Moving to:
$destinationCity 
$destinationState 
$destinationZip 

Estimated Weight: $estimateWeight
Number of Furnished Rooms: $numberFurnishedRooms

Other Comments or Requests: $otherCommentsOrRequests
End of message
";

/* Send the message using mail() function */
mail($myemail, $subject, $message);

/* Redirect visitor to the thank you page */
header('Location: estimate_redirect.htm');
exit();

/* Functions we used */
function check_input($data, $problem='')
{
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    if ($problem && strlen($data) == 0)
    {
        show_error($problem);
    }
    return $data;
}
function show_error($myError)
{
?>
    <html>
    <body>

    <b>Please correct the following error:</b><br />
    <?php echo $myError; ?>

    </body>
    </html>
<?php
exit();
}

?>

Link to comment
https://forums.phpfreaks.com/topic/121758-no-input-file-specified/
Share on other sites

For those of you that looked and tried to help thank you,

It looks like this one is to big a problem for this forum.

 

Thanks anyhow.

 

I am going to have to find a form that works for me. 

 

Does phpfreaks have a form tutorial?  I haven't been able to find it if you do.

 

My knowledge is to limited in this language. 

Your form is correct, and your PHP code. You're not at fault.

 

This has to be some form of server configuration issue (which is out of your control). You should have a word with your host about this.

 

As a test what happens if you create a new script and run it:

<?php

echo 'PHP works!';

?>

Do you get the same error? If you do then it is definitely a server configuration issue.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.