IE vs Firefox fourm submit issues
Posted: Tue Oct 03, 2006 10:32 pm
This seems to be a strange error, when I click submit in IE, nothing. But, when I use the same page in Firefox, the form submits and everything seems fine.
Here's the code:
Here's the code:
Code: Select all
<?PHP
$action = $_GET['action'];
$mode = $_GET['mode'];
$ProductID = $_GET['ProductID'];
$dbh=mysql_connect ("localhost", "******", "*******") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ('db');
$query = "SELECT * FROM CLOTHING WHERE ProductID = '" . $ProductID . "'";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
$row = mysql_fetch_assoc($result);
$query = "SELECT * FROM ARTISTS ORDER BY ArtistID ASC";
$result2 = mysql_query($query) or die('Query failed: ' . mysql_error());
echo "<h1>Edit Item</h1>\n";
echo "<table align=center width=100%>\n";
echo "<form enctype=\"multipart/form-data\" action=\"index.php?mode=clothing&action=upload\" method=\"POST\">\n";
echo "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"300000\" />\n";
echo "<input type=\"hidden\" name=\"ProductID\" value=\"".$ProductID."\" />\n";
echo "<tr align=left><td width=\"105\">Name: </td><td width=\"272\"><input value=\"" . $row['Name'] . "\"name=\"Name\" type=\"text\" maxlength=\"45\" size=\"45\" /></td></tr>\n";
echo "<tr align=left><td>Price: </td><td><input value=\"" . $row['Price'] . "\" name=\"Price\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Sold: </td><td><select name=\"Sold\">\n";
switch ($row['Sold']) {
case "0":
echo "<option value=\"1\">Yes</option>\n<option value=\"0\" SELECTED>No</option>\n</select>\n";
break;
case "1":
echo "<option value=\"1\" SELECTED>Yes</option>\n<option value=\"0\">No</option>\n</select>\n";
break;
}
echo "<tr align=left><td>Artist: </td><td><select name=\"ArtistID\">\n";
while ($row2 = mysql_fetch_assoc($result2)) {
$message = "<option value=\"".$row2['ArtistID']."\"";
if ($row['ArtistID'] == $row2['ArtistID']) { $message = $message . " SELECTED >"; }else{$message = $message . ">";}
$message = $message . $row2['FirstName'] . " " . $row2['LastName'] . "</option>\n";
echo $message;
}
echo "</select>\n";
echo "</td></tr>";
echo "<td><tr>";
mysql_free_result($result2);
$query = "SELECT * FROM CATEGORY WHERE Parent = '1' ORDER BY CategoryID ASC";
$result3 = mysql_query($query) or die('Query failed: ' . mysql_error());
echo "<tr align=left><td>Category: </td><td><select name=\"CategoryID\">\n";
while ($row3 = mysql_fetch_assoc($result3)) {
$message = "<option value=\"" . $row3['CategoryID'] ."\"";
if ($row['CategoryID'] == $row3['CategoryID']) { $message = $message . " SELECTED >"; }else{$message = $message . ">";}
$message = $message . $row3['Name'] . "</option>\n";
echo $message;
}
echo "</select>\n";
mysql_free_result($result3);
echo "<tr align=left><td>Description: </td><td><textarea rows=10 cols=60 name=\"Desc\" rows=\"4\" >" . $row['Desc'] . "</textarea></td></tr>\n";
echo "</td></tr>\n";
echo "<tr align=left><td colspan=\"2\"><h2><b>Measurements</b></h2></td></tr>\n";
echo "<tr align=left><td colspan=\"2\"><em>Note: Enter in only the measurements that are pertinant.</em></td></tr>\n";
echo "<tr align=left><td>Bodice: </td><td><input value='" . $row['Bodice'] . "' name=\"Bodice\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Spin: </td><td><input value='" . $row['Spin'] . "' name=\"Spin\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Length: </td><td><input value='" . $row['Length'] . "' name=\"Length\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Waist: </td><td><input value='" . $row['Waist'] . "' name=\"Waist\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Inseam: </td><td><input value='" . $row['Inseam'] . "' name=\"Inseam\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td>Chest: </td><td><input value='" . $row['Chest'] . "' name=\"Chest\" maxlength=\"20\" type=\"text\" /></td></tr>\n";
echo "<tr align=left><td colspan=\"2\"><h2><b>Images</b></h2><br /><em>Only use browse if you want to change the current picture.</em></td></tr>\n";
echo "<tr><td colspan=100%><table cellspacing=0 cellpadding=0 border=1 bordercolor=red width=800>\n";
echo "<tr align=center><td>\n";
echo "<strong>Front:</strong><br />\n";
if (file_exists("/home/guttersg/www/images/clothing/" . $row['ProductID'] . "_front.jpg")) {
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/clothing/" . $row['ProductID'] . "_front.jpg>\n";
}else{
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/noimg.jpg>\n";
}
echo "<br /><input name=\"front\" type=\"file\" />\n";
echo "</td>\n";
echo "<td>\n";
echo "<strong>Back:</strong><br />\n";
if (file_exists("/home/guttersg/www/images/clothing/" . $row['ProductID'] . "_back.jpg")) {
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/clothing/" . $row['ProductID'] . "_back.jpg>\n";
}else{
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/noimg.jpg>\n";
}
echo "<br /><input name=\"back\" type=\"file\" />\n";
echo "</td></tr>\n";
echo "<tr align=center><td>\n";
echo "<strong>Detail 1:</strong><br />\n";
if (file_exists("/home/guttersg/www/images/clothing/" . $row['ProductID'] . "_detail1.jpg")) {
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/clothing/" . $row['ProductID'] . "_detail1.jpg>\n";
}else{
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/noimg.jpg>\n";
}
echo "<br /><input name=\"detail1\" type=\"file\" />\n";
echo "</td>\n";
echo "<td>\n";
echo "<strong>Detail 2:</strong><br />\n";
if (file_exists("/home/guttersg/www/images/clothing/" . $row['ProductID'] . "_detail2.jpg")) {
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/clothing/" . $row['ProductID'] . "_detail2.jpg>\n";
}else{
echo "<img name=prodimg" . $row['ProductID'] . " width=300px height=400px src=/images/noimg.jpg>\n";
}
echo "<br /><input name=\"detail2\" type=\"file\" />\n";
echo "</td></tr>\n";
echo "</table></td></tr>\n";
echo "<tr align=left><td colspan=\"2\" align=\"left\"><br /><br /><input type=\"submit\" value=\"Submit\" onClick=\"this.disabled=true; this.value='Please Wait...';\"/> <input type=reset> <input type=button value=Cancel onClick=\"window.location='index.php?mode=clothing'\"></td></tr>\n";
echo "</form>\n";
echo "</table>\n";
mysql_free_result($result);
mysql_close($dbh);
?>