I’ve made a php script, that has the job to print text on a Jpg Image, that will be used as Buttons for my website.
However, it doesn’t show any picture with a text on it.
So, i tested the code on a PHP Code checker, and there was nothing wrong with it.
Source file for the JPG Button is on the same directory as the script.

PHP Code
<?php
$Text = $_GET['value'];
$Image = ImageCreateFromJPEG("Button.jpg");
$Cord = imagecolorallocate($rImg, 0, 0, 0);
imagestring($Image,3,3,3,urldecode("$Text"),$Cord);
header('Content-type: image/jpeg');
imagejpeg($Image,NULL,100);
?>
The Size of the Picture that it should write text to is “100 x 30”
So, this could be a simple problem, but I am not sure what cause this.
You are allocating the colour to
$rImg, a variable which doesn’t exist. Put$Imagethere instead.