Rosst Posted November 24, 2006 Share Posted November 24, 2006 Ok what I want to do is submit a form which goes to a php file which generates a image which will then be displayed on the page with the form, I have tryed and it hasn't worked. Quote Link to comment https://forums.phpfreaks.com/topic/28310-want-to-know-how-to-do-this/ Share on other sites More sharing options...
ober Posted November 24, 2006 Share Posted November 24, 2006 Can you post your code? Quote Link to comment https://forums.phpfreaks.com/topic/28310-want-to-know-how-to-do-this/#findComment-129631 Share on other sites More sharing options...
Barand Posted November 25, 2006 Share Posted November 25, 2006 Create php file to create your image EG::myimage.php::[code]<?php // create image$im = imagecreate(64,64); // define colors$bg = imagecolorallocate($im, 0x00, 0x00, 0xFF);$circ = imagecolorallocate($im, 0xFF, 0xFF, 0x00); // draw imageimagefilledellipse($im, 32,32,48,48,$circ); // output imageheader('content-type: image/png');imagepng($im); // free image from memoryimagedestroy($im); ?>[/code]and in the page where you want the image[code]<img src='myimage.php'>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/28310-want-to-know-how-to-do-this/#findComment-130039 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.