aeroswat Posted March 1, 2010 Share Posted March 1, 2010 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; } } Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/ Share on other sites More sharing options...
taquitosensei Posted March 1, 2010 Share Posted March 1, 2010 I might know. But I definitely don't without knowing what the issues are. Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020052 Share on other sites More sharing options...
aeroswat Posted March 1, 2010 Author Share Posted March 1, 2010 I might know. But I definitely don't without knowing what the issues are. The issue is that it is not downloading the file. Also it is not Truncating the table. This works in firefox tho. Is the content header wrong for IE? Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020054 Share on other sites More sharing options...
aeroswat Posted March 1, 2010 Author Share Posted March 1, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020066 Share on other sites More sharing options...
aeroswat Posted March 1, 2010 Author Share Posted March 1, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020076 Share on other sites More sharing options...
aeroswat Posted March 1, 2010 Author Share Posted March 1, 2010 I have found that the buttons are not sending POST variables at all... Is this because the input type is an image? Can't imagine why it would act like that in Internet Explorer. Can anyone at all help me? Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020086 Share on other sites More sharing options...
teamatomic Posted March 1, 2010 Share Posted March 1, 2010 use an onClick to submit the form HTH Teamatomic Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020144 Share on other sites More sharing options...
aeroswat Posted March 2, 2010 Author Share Posted March 2, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/193807-issues-with-script-in-ie/#findComment-1020404 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.