Jump to content

Issues with script in IE


aeroswat

Recommended Posts

Internet Exploder is giving me problems with this and I was just curious if anyone might know why

 

if( isset($_POST['Submit']) )
{
$mysql_host=DB_HOST;
$mysql_database=DBA_DATABASE;
$mysql_username=DBA_USER;
$mysql_password=DB_PASSWORD;

	_mysql_test($mysql_host,$mysql_database, $mysql_username, $mysql_password);
		$print_form=0;

		ob_start("ob_gzhandler");
		header('Content-type: text/plain');
		switch($_POST['Submit']) {
			case 'orders':
				header('Content-Disposition: attachment; filename="'.$_SESSION['SESS_FIRST_NAME']."_orders_".date('m_d_Y_h-iA').'.sql"');
				break;
			case 'live':
				header('Content-Disposition: attachment; filename="'.$_SESSION['SESS_FIRST_NAME']."_liveorders_".date('m_d_Y_h-iA').'.sql"');
				break;
		}
		switch($_POST['Submit']) {
			case 'orders':
				_mysqldump("tblOrders");
				break;
			case 'live':
				_mysqldump("tblLiveOrders");
				break;
		}

		header("Content-Length: ".ob_get_length());

		ob_end_flush();
		switch($_POST['Submit']) {
			case 'orders':
				mysql_query("TRUNCATE TABLE tblOrders");
				break;
			case 'live':
				mysql_query("TRUNCATE TABLE tblLiveOrders");
				break;
		}
}

Link to comment
https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/
Share on other sites

From what I can tell I think it's the ob functions but I'm not exactly sure. I need these functions in order to stop the page from outputting EVERYTHING to the file. There is tracking code that my host slaps on at the end of every page from their server and this messes stuff up if I leave it in there.

Ok so I don't think that its the ob functions anymore. I commented those out and they still don't show up. What I'm thinking is that for some reason the POST variables are not getting submitted although I don't know what the case for that would be. This is the code for my form.

 

<form action="" method="post">
<div style="position:relative;left:200">
	Reset Orders       <input type="image" src="delete-order.png" title="Permanently Delete Orders" name="Submit" value="orders">
</div><br /><br />
<div style="position:relative;left:200">
Reset Live Orders <input type="image" src="delete-order.png" title="Permanently Delete Live Orders" name="Submit" value="live">
</div>
</form>

 

Is there no one out there that will even attempt to help me with this?

use an onClick to submit the form

 

 

HTH

Teamatomic

 

Can't do that because I need the name and value of each of the buttons. I changed it to using a css submit button instead. Found out that Internet Explorer isn't following the correct way of doing things as far as this goes. The only thing that is sent with an image or button input in internet explorer is the x and y coordinates of the specific input. Nothing else. All other browsers work as expected and send the coordinates plus the name/value pair. Thanks for trying to help me.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.