Jump to content

[SOLVED] submit button not working in IE.


themightydude

Recommended Posts

This doesn't work in IE7 or IE 6...but it does work in firefox.

 

This script pulls data from a mysql database into text boxes...user can then update those text boxes with new information...however when you hit submit in IE6 or 7, nothing happens.

 

Any ideas?

 

Also, please forgive me...the HTML code is a bit messy...I did this in Microsoft expression web real quick.

 

This is the edit page...all the text boxes are filled in with values from the database...then when the user hits update, that data is then sent to update.php

 

<html>
<body>

<?php
$dbhost = 'localhost';
$dbuser = 'xxxxx';
$dbpass = 'xxxxx';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die
		('Error Connectiong to MySQL');
mysql_select_db('uam') or die(mysql_error());


if (empty($_GET['id'])) {

$search = FALSE;
$message .= '<p>Error Editing File</p>';
} else {


// SQL QUERY

$query = "SELECT * from value where id = '$_GET[id]'" or die(mysql_error());
$result = mysql_query($query);


while($row = mysql_fetch_array($result))



{

$year = 		     	$row['year'];
$actype = 				$row['aircraft_fleet'];
$tail = 				$row['tail_number'];
$engines = 				$row['engines'];
$apu = 					$row['apu'];
$lease_value =			$row['lease_value'];
$engine_value = 		$row['engine_value'];
$engine_lease_value =   $row['engine_lease_value'];
$aircraft_value =	 	$row['aircraft_value'];
$serial_number =	 	$row['serial_number'];
$vintage = 			 	$row['vintage'];
$apu_lease_value = 	 	$row['apu_lease_value'];
$data_type =         	$row['data_ype'];
$notes =             	$row['notes'];
$engine_mfg =        	$row['engine_mfg'];
$month =             	$row['month'];
$id = 					$row['id'];


}

}


?>


<form method="post" action="update.php">
<strong>CURRENT VALUES:</strong><br />
<br />
<br />
Year:                                	<input name="year" type="text" value="<?php print $year; ?>" />
<div style="position: absolute; width: 100px; height: 165px; z-index: 1; left: 470px; top: 210px" id="layer1">

	<textarea name="notes"  style="width: 285px; height: 170px" rows="1" cols="20"><?php print $notes; ?></textarea></form>
</div>




<p>Aircraft Type:                   <input name="aircraft_fleet" type="text" value="<?php print $actype; ?>"></p>
<p>Tail Number:                    <input name="tail_number" type="text" value="<?php print $tail; ?>"></p>                                                
   &nbspNotes:</p>
<p>Engine:                             
<input name="engines" type="text" value="<?php print $serial_number; ?>"></p>
<p>APU:                               
<input name="apu" type="text" value="<?php print $apu; ?>"></p>
<p>Lease Value:                    
<input name="lease_value" type="text" value="<?php print $lease_value; ?>"></p>
<p>Engine Value:                   
<input name="engine_value" type="text" value="<?php print $engine_value; ?>"></p>
<p>Engine Lease Value:        
<input name="engine_lease_value" type="text" value="<?php print $engine_lease_value; ?>"></p>
<p>Aircraft Value:                
<input name="aicraft_value" type="text" value="<?php print $aircraft_value; ?>"></p>
<p>Serial Number:               
<input name="serial_number" type="text" value="<?php print $serial_number; ?>"></p>
<p>Vintage:                         
<input name="vintage" type="text" value="<?php print $vintage; ?>"></p>
<p>APU Lease Value          
<input name="apu_lease_value" type="text" value="<?php print $apu_lease_value; ?>"></p>
<p style="height: 20px"><br />
Data Type:                   
<input name="data_type" type="text" value="<?php print $data_type; ?>"></p>
<input name="id" type="hidden" value="<?php print $id; ?>"></hidden>
<input type="submit" value="UPDATE">


<?php




mysql_free_result($result);

mysql_close();







?>


</form>
</body>
</html>

 

And heres update.php

 

<?php
$dbhost = 'localhost';
$dbuser = 'xxxxx';
$dbpass = 'xxxxx';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die
		('Error Connectiong to MySQL');
mysql_select_db('uam') or die(mysql_error());






// SQL QUERY

$query = "UPDATE value SET year='$_POST[year]', aircraft_fleet='$_POST[actype]', tail_number='$_POST[tail]', engines='$_POST[engines]',apu='$_POST[apu]', lease_value='$_POST[lease_value]', engine_value='$_POST[engine_value]', engine_lease_value='$_POST[engine_lease_value]', aircraft_value='$_POST[aircraft_value]', serial_number='$_POST[serial_number]', vintage='$_POST[vintage]', apu_lease_value='$_POST[apu_lease_value]', data_type='$_POST[data_type]', notes='$_POST[notes]', engine_mfg='$_POST[engine_mfg]', month='$_post[month]' where id='$id'";
if (!mysql_query($query,$conn))
{
	die('Error: ' . mysql_error());
}


echo '<p><b>1 Record Added</p></p>';
echo '<p><b><a href="defaut.php">Go Back</a></p>';
mysql_close(); // close database connection





?>

 

 

Link to comment
Share on other sites

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.