See example here
Ultimately I want the image created to display next to the update button in the same browser window instead of loading into a new window. Then every time I input text and click 'update' the image is regenerated. As if you're customizing the image with whatever text the user inputs.
A similar example I've found online is here.
I'm simply just posting the text input variable to a PHP file to generate the image in the following PHP file:
I've searched high and low to resolve this but had no luck - hoping somebody can help...
Ultimately I want the image created to display next to the update button in the same browser window instead of loading into a new window. Then every time I input text and click 'update' the image is regenerated. As if you're customizing the image with whatever text the user inputs.
A similar example I've found online is here.
I'm simply just posting the text input variable to a PHP file to generate the image in the following PHP file:
Code:
<?php $my_img = imagecreate( 200, 80 ); $background = imagecolorallocate( $my_img, 0, 0, 255 ); $text_colour = imagecolorallocate( $my_img, 255, 255, 0 ); $line_colour = imagecolorallocate( $my_img, 128, 255, 0 ); $input_text = $_REQUEST['name'] ; imagestring( $my_img, 4, 30, 25, $input_text, $text_colour ); imagesetthickness ( $my_img, 5 ); imageline( $my_img, 30, 45, 165, 45, $line_colour ); header( "Content-type: image/png" ); imagepng( $my_img ); imagecolordeallocate( $line_color ); imagecolordeallocate( $text_color ); imagecolordeallocate( $background ); imagedestroy( $my_img ); ?>
Comment