I made changes to a php page, I added a new paragraph and didn't change any PHP code, now my form won't submit when I click the calculate button!
Here's my code:
<?PHP
include ("../php_hayes_connect.php");
if ($submit="Calculate!") {
extract($HTTP_GET_VARS);
$lye=0;
$oils=0;
for ($i=1;$i<=$count;$i++) {
if (${"amt".$i}>0) {
$lye=($lye+(${"amt".$i}${"NAOH".$i}));
$oils=($oils+${"amt".$i});
}}
$lye=$lye-(($discount/100)$lye);
$water=($oils0.33);
$wdiscount2=($water($wdiscount/100));
$water=($water-$wdiscount2);
$FOEO=(($FOEO/100)$oils);
}
$get_oils = mysql_query("SELECT ,COUNT(oil) from lye_calc GROUP BY oil");
$row = mysql_fetch_array($get_oils);
?><form name="form1" method="GET" action="<?PHP echo $PHP_SELF; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><h1>RJ's Soapin List Lye Calculator</h1>
</td>
</tr>
<tr>
<td width="60%"><table width="100%">
<tr>
<?PHP $i=1; $count=$row["COUNT(oil)"];
do { echo ("<td>" .$row["oil"]. " <input type=hidden name=NAOH" .$i." value=". $row["NAOH"]."><input type=hidden name=oil".$i." value=".$row["oil"]."></td><td><input type=text name=amt".$i." value='".${(amt.$i)}."' size=5></td>\n");
if ($i % 3 == 0 ) {echo ("</tr><tr>");}
$i++;
$count++;
} while ($row=mysql_fetch_array($get_oils));
?>
</tr>
</table></td>
<td width="40%" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="48%"><strong>Units of Measure</strong></td>
<td width="52%"><input name="measure" type="text" value="<?PHP if ($submit) {echo $measure;} else {echo "ounces";}?>" size="10"></td>
</tr>
<tr>
<td><strong>Superfat</strong></td>
<td><select name="discount">
<option selected>
<?PHP if ($submit) {echo ($discount);} else {printf ("5%");} ?></option>
<option>0%</option>
<option>1%</option>
<option>2%</option>
<option>3%</option>
<option>4%</option>
<option>5%</option>
<option>6%</option>
<option>7%</option>
<option>8%</option>
<option>9%</option>
<option>10%</option>
</select></td>
</tr>
<tr>
<td><strong>Water Discount</strong></td>
<td><select name="wdiscount">
<option selected>
<?PHP if ($submit) {echo ($wdiscount);} else {printf ("0%");} ?>
</option>
<option>0%</option>
<option>5%</option>
<option>10%</option>
<option>12%</option>
<option>15%</option>
<option>20%</option>
</select></td>
</tr>
<tr>
<td><strong>Fragrance (EO/FO)</strong></td>
<td><select name="FOEO">
<option selected>
<?PHP if ($submit) {echo ($FOEO);} else {printf ("0%");} ?>
</option>
<option>0.5%</option>
<option>1%</option>
<option>2%</option>
<option>3%</option>
<option>4%</option>
<option>5%</option>
<option>6%</option>
<option>7%</option>
</select></td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<?PHP for ($i=1;$i<=$count;$i++) { if (${"amt".$i}>0) { echo("<tr><td>".${"oil".$i}."</td><td>".${"amt".$i}." ".$measure."</td></tr>"); }} ?>
<?PHP if ($lye>0) printf("<tr><td><strong>Lye:</strong> </td><td>%.3f %s</td></tr><tr><td><strong>Water:</strong></td><td>%.2f %s</td></tr><tr><td><strong>Fragrance (FO/EO):</strong></td><td>%.2f %s</td></tr><tr><td colspan=2><hr></td></tr>",$lye,$measure,$water,$measure,$FOEO,$measure); ?>
<tr>
<td> </td>
<td><input name="submit" type="submit" value="Calculate!"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
<td><?PHP echo "<input type=hidden name=count value=".$count.">" ?></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><p>* Superfat % means how much oils should remain in the
bar of soap once saponified. Enter ALL oils used into the calculator,
including ones added at trace.<br>
** Water Discount - when making soap using HP, a water discount is recommended.
Select the amount of discount you would like to use, and click calculate
to get the water amount you will use.<br>
***Fragrance - Enter the percent of fragrance you would like to use,
and click calculate. The amount will be calculated for you!<br>
NOTE: If there is an oil you would like to have added to this calculator,
please <a href="mailto:melanie@hayeswebdesign.com">contact Melanie</a>.</p>
</td>
</tr>
</table>
</form>
What am I doing wrong here? If I view the source on the page, http://recipes.herbalsoapsbyrj.com/calculators/lye-calc1.php it looks fine. I can't figure it out. PLEASE HELP!
Thanks,