Jump to content

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


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);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.