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? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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! Quote Link to comment 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.