I am having a frustrating problem with a form once the submit button is clicked. Both IE and FF will run the javascript validation correctly, but once it starts loading the page indicated in “action=page” IE gives me an HTTP 500 error with no information on what exactly is going on while Firefox starts displaying the page. Any help in finding out what is wrong or how to fix it would be appreciated.
This is the code for the page that should display once the submit button is clicked. It isn’t complete, I am just testing right now.
[CODE]
<?
//Parts
$part_numbers = array(); //Part numbers for parts quoted.
$descriptions = array(); //Descriptions.
$notes = array(); //Notes.
$qntys = array(); //Number of the part quoted.
$prices = array(); //Price per item.
for ($i = 0; $i < 5; $i++)
{
$part_numbers[$i] = trim($_POST[‘part_number_’. $i]);
$descscriptions[$i] = trim($_POST[‘description_’. $i]);
$notes[$i] = trim($_POST[‘notes_’. $i]);
$qntys[$i] = trim($_POST[‘qty_’. $i]);
$prices[$i] = trim($_POST[‘unit_price_’. $i]);
}
?>
<html>
<head>
<title>Parts Inserted</title>
<link rel=”stylesheet” href=”opms.css”>
<link rel=”stylesheet” href=”form.css”>
<link rel=”stylesheet” href=”status.css”>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<?
echo ‘Part Numbers: ‘;
for ($i = 0; $i < 5; $i++)
{
echo $part_numbers[$i];
echo ‘<br />’;
}
?>
</html>
Here is the code for the actual form:
[CODE]
<?
class c_part_insert
{
//Display the part insert form
function display_part_input() {
echo ‘<form name =”part_insertion” action=”Classespart_in_handler.php” method=”post” onSubmit=”return check_form()”>’;
for ($i = 0; $i < 5; $i++) {
echo ‘<table border=”1″ class=”items” cellpadding=”5″ cellspacing=”3″ width=”760″ bgcolor=”#EEEEEE”>
<tr>
<td class=”field” width=”300″>Item #’. ($i + 1) .'</td>
<td colspan=”2″ class=”field” width=”150″>Pricing</td>
</tr>
<tr valign=”items”>
<td valign=”top” class=”items”><font class=”small_text”>Part Number</font><br>
<input type=”text” name=part_number_’. $i .’ value=”” onChange=”part_compare(‘. $i .’)” size=”80″ maxlength=”100″></td>
<td valign=”top” class=”items”><font class=”small_text”>Quantity</font><br>
<input type=”text” name=qty_’. $i .’ value=”” size=”10″ maxlength=”7″></td>
<td valign=”top” class=”items”><font class=”small_text”>Price (each)</font><br>
<input type=”text” name=unit_price_’. $i .’ value=”” size=”10″ maxlength=”10″></td>
</tr>
<tr>
<td valign=”top”><font class=”small_text”>Description:</font><br>
<input type=”text” name=description_’. $i .’ value=”” size=”80″ maxlength=”255″><br>
<font class=”small_text”>Notes:</font><br>
<textarea name=notes_’. $i .’ rows=”2″ cols=”60″></textarea></td>
<td colspan=”2″ valign=”middle” align=”center”><input type=”button” name=”remove_button_’. $i .'” value=”Remove Item” onClick=”remove_item(‘. $i .’)”></td>
</tr>
</table>
<br>’;
if ($i == 4) {
echo ‘<input type=”submit” value=”Submit”>’;
}
echo ‘<br>’;
}
echo ‘</form>’;
}
}