Jump to content

Creating buttons to the length of the printing - is it possible?


cturner

Recommended Posts

Is there a way to create a button to the length of the button's printing? Thanks in advance.

 

Here is my code:

$name1 = stripslashes($_POST['pagetitle']);
$name2 = str_replace('%20', ' ', $name1);
$name3 = strtoupper($name2);							
$pagetitle5 = stripslashes($_POST['pagetitle']);
$pagetitle6 = str_replace("'", '', $pagetitle5);
$pagetitle7 = str_replace('%20', '', $pagetitle6);
$pagetitle8 = strtolower($pagetitle7);
function makeimage($pagetitle8, $name3) {
header("Content-type: image/jpeg");
$im = @imagecreate(110, 23) or die("Cannot Initialize new GD image stream.");
$background_color = imagecolorallocate($im, 0, 57, 122);
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 3, 10, 5,  $name3, $text_color);
imagejpeg ($im, "images/".$pagetitle8."btn.jpeg");
imagedestroy($im);
}
makeimage($pagetitle8, $name3);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.