bagpiperdude90 Posted May 31, 2007 Share Posted May 31, 2007 First off, I'm new here. I did do a search, and didn't see anything like the problem I'm having. Ok, I've developed a website that somebody asked me to make, more as a joke than anything else. I've only gotten the PHP script working - haven't started on the site design yet. Open up IE 7 (maybe 6 and before do this to; I'm not sure. I only KNOW that firefox WORKS, and IE 7 does NOT work). Here's the site: http://www.mancardmaker.com Go to the second page in, and enter in some info (you don't have to do all of it - just a random first name and a random last name). Also, in the Image URL box, put in "boy.png". Hit submit. Ok, so obviously the name(s) and the boy image were created using variables passed from another page. The date and date expires text was created using some php code, not using variables. Ok, now print the page. If you were in IE7, only the base image and the dates and the commas will print. Those were overlayed exactly the same as all the other text, though. In fact, the "[Last name], [First name]" is all compiled into one variable, and then printed. However, the source of the first and last names came from variables, and the source of the comma came from a static declaration. Here's the code I'm talking about: // gets first and last name from form from previous page $fname = $_POST['fname']; $lname = $_POST['lname']; //Put last and first name into new variable, with ", " inbetween. $name = "$lname" . ", " . "$fname"; // Took out some irrelevant code // Here's the code to display the image $img_handle = imageCreateFromPNG("mancard.png"); $color = ImageColorAllocate ($img_handle, 100, 100, 100); //and to write that $name variable ImageString ($img_handle, 3, 7, 80, "$name", $color); //then more code is below to actually display image, and to overlay the ID photo the user provides Now, when it prints out in IE7, the original $fname and $lname variables don't come through the print. However, the ", " declared in $name does print. Also, if you right click and "print image" or even just "save image" in IE7, it doesn't display the original strings in $fname and $lname. In firefox, it works perfectly. Not sure about Safari or Opera. Any ideas? It's obviously something about losing all the form data, maybe IE7 is regenerating the picture when it prints it? Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/53790-browser-problems-printing-php-edited-images-that-used-variables/ Share on other sites More sharing options...
bagpiperdude90 Posted June 1, 2007 Author Share Posted June 1, 2007 hmm, thats odd. I tried "working offline" in IE, and it printed fine the first time. The second time it didn't work. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/53790-browser-problems-printing-php-edited-images-that-used-variables/#findComment-266027 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.