Jump to content

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.

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.