Crew-Portal Posted November 10, 2007 Share Posted November 10, 2007 Okay I understand how to do image_create and image_destroy and all the things to make an image in PHP but how do I get SQL querys running on the image... Lets say i wanted a 100 height by 200 width image white background with black text showing how many users there are in a table called `user`, Each time I try making a simple images / SQL script like that the image doesnt show up and it comes out in a bunch of text: ÃÃâ€Ã¢â‚¬â„¢ÃƒÆ’â€Ã¢â‚¬â„¢ÃƒÆ’â€Ã¢â‚¬â„¢ÃƒÃâ€Ã¢â‚¬â„¢ÃƒÆ’‚¢Ã¢â€šÂ¬Ã…¡ÃÃâ€Ã¢â‚¬â„¢ÃƒÆ’â€Ã¢â‚¬â„¢ÃƒÆ’¢â‚¬Å¡ÃÃâ€Ã¢â‚¬â„¢ÃƒÆ’¢â‚¬Å¡Ãƒâ€šÃ‚© So how would I fix this? Link to comment https://forums.phpfreaks.com/topic/76724-solved-imagesfun/ Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 have you got your content-type set ? in the script Link to comment https://forums.phpfreaks.com/topic/76724-solved-imagesfun/#findComment-388423 Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Umm. No I got ImageCreate(150,150); How would I do that script at the top (First Post)? ... Or is that asking too much? Link to comment https://forums.phpfreaks.com/topic/76724-solved-imagesfun/#findComment-388427 Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 just above the script you should put something like this header("Content-type: image/png"); for png or header("Content-type: image/jpg"); for jpg or header("Content-type: image/gif"); for gif Link to comment https://forums.phpfreaks.com/topic/76724-solved-imagesfun/#findComment-388429 Share on other sites More sharing options...
Crew-Portal Posted November 10, 2007 Author Share Posted November 10, 2007 Argghhh! Hours of trying to figure out what my problem is and you get it working in like 5 mins! Shoulda came on PHP freaks earlyier! Thanx! Link to comment https://forums.phpfreaks.com/topic/76724-solved-imagesfun/#findComment-388436 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.