l3vi
05-06-2003, 03:40 AM
I am trying to make a code where somebody just enters there name, and it will draw a box 4 each letter of there name... BUT! I cant figure out how 2 do that... Plz help me... This is all I have so far...
$Name = "$_POST[Name]";
$Name = ltrim($Name);
$Name = ucfirst($Name);
$amount = strlen($Name);
print("Your name contains $amount letters!<br>");
$im = imagecreate(200,50);
$white = imagecolorallocate($im,255,255,255);
$black = imagecolorallocate($im,0,0,0);
$blue = imagecolorallocate($im,189,199,299);
imagefill($im,0,0,$blue);
foreach ($Name as $amount){
ImageRectangle($im,0,0,25,25,$white);
}
But that doesnt seem to work... If you could tell me how to do this, I WOULD GREATLY APPRECIATE IT! :) :) :) :)
$Name = "$_POST[Name]";
$Name = ltrim($Name);
$Name = ucfirst($Name);
$amount = strlen($Name);
print("Your name contains $amount letters!<br>");
$im = imagecreate(200,50);
$white = imagecolorallocate($im,255,255,255);
$black = imagecolorallocate($im,0,0,0);
$blue = imagecolorallocate($im,189,199,299);
imagefill($im,0,0,$blue);
foreach ($Name as $amount){
ImageRectangle($im,0,0,25,25,$white);
}
But that doesnt seem to work... If you could tell me how to do this, I WOULD GREATLY APPRECIATE IT! :) :) :) :)