nd3_2000 Posted January 11, 2010 Share Posted January 11, 2010 I am working on a voucher website where companies post offers on the site, then a user clicks a button to get a generic voucher BUT with the companies offer and contact details etc done through a php script using a SQL resultset. Problem is, in Firefox, when you go to print preview and and also print it off the data is there.....BUT in Internet Explorer, the data shows but when you go to print preview and also print it off the data is missing.....this is annoying as the whole point the site is to get companies offers as stated. Am a bit stuck has anyone got any ideas? Here is the code I am using <?php $string1= $_POST['Link']; $string2= $_POST['Link2']; $string3= $_POST['Link3']; $ImageLoc =$_POST['ImageLoc']; header("content-type: image/jpeg"); $wm = imagecreatefromjpeg($ImageLoc); $img = imagecreatefromjpeg("Vouchernew.jpg"); $wmsize = getimagesize($ImageLoc); $imgsize = getimagesize("banner2.jpg"); imagecopymerge($img,$wm,125,5, 0, 0, $wmsize[0], $wmsize[1], 100);//last numeric is image transparancy $text_colour = imagecolorallocate( $img, 0, 0, 0 ); imagestring( $img, 4, 270, 310, $string1,$text_colour );//Compname imagestring( $img, 4, 650, 310, $string3, $text_colour ); //Phone imagestring( $img, 4, 270, 350, $string2, $text_colour ); //Deal imagejpeg($img); imagedestroy($img); imagedestroy($wm); ?> the code works fine, just it wont print the data in IE Quote Link to comment https://forums.phpfreaks.com/topic/188127-internet-explorer-wont-print-my-sql-resultset/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 11, 2010 Share Posted January 11, 2010 Are any of the $_POST variables from an image being used as a submit button? If so, read the following link on how you should be accessing the data so that it works in all browsers (according to the w3.org HTML specification) - http://us.php.net/manual/en/faq.html.php#faq.html.form-image Quote Link to comment https://forums.phpfreaks.com/topic/188127-internet-explorer-wont-print-my-sql-resultset/#findComment-993202 Share on other sites More sharing options...
nd3_2000 Posted January 11, 2010 Author Share Posted January 11, 2010 No theyre not........this is SO weird...like I said the data is there when you see the page..its just when you go to print preview and also try and print it off all the data dissapears...... Yet it works fine in FF Quote Link to comment https://forums.phpfreaks.com/topic/188127-internet-explorer-wont-print-my-sql-resultset/#findComment-993213 Share on other sites More sharing options...
PFMaBiSmAd Posted January 12, 2010 Share Posted January 12, 2010 If you have data present on one page, but it is not being submitted to another page as $_POST variables, it is highly likely that your form is invalid HTML and one browser is ignoring the markup errors while a different browser is not. You have not posted the code of the page that is submitting to the code you did post, so it will be a little hard for anyone to directly help with what is causing the problem. You have just posted the code that is using the data and are expecting that someone can tell why it is not receiving data that is being produced somewhere else. Quote Link to comment https://forums.phpfreaks.com/topic/188127-internet-explorer-wont-print-my-sql-resultset/#findComment-993445 Share on other sites More sharing options...
nd3_2000 Posted January 12, 2010 Author Share Posted January 12, 2010 With respect, if you actually read what I have said, it is not an issue of the data not showing when the page is loaded. THAT works fine on both IE and FF. The data is there on BOTH, it is when I click on print preview and also print the page that the data dissapears in IE, so it prints a blank voucher (again ONLY in IE, it prints off fine in FF and is also visible in print preview) The previous pages code simply returns an SQL string, places required values in hidden boxes and on a BUTTON click passes that data to the main voucher page. Quote Link to comment https://forums.phpfreaks.com/topic/188127-internet-explorer-wont-print-my-sql-resultset/#findComment-993511 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.