ok i have had an attempt but it aint worked. can you tell me why?
<?php
$user="joshuacottom_db";
$password=" ";
$database="joshuacottom_db";
$color=$_POST['color'];
$name=$_POST['name'];
$centre=$_POST['centre'];
$size=$_POST['size'];
$x=$_POST['x'];
$y=$_POST['y'];
$angle=$_POST['angle'];
$font=$_POST['font'];
$color_r=$_POST['color_r'];
$color_g=$_POST['color_g'];
$color_b=$_POST['color_b'];
mysql_connect('db4.awardspace.com','joshuacottom_db',' ';
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO sig VALUES ('','color','$name','$centre','$size','$x','$y','$angle','$font','','$color_r','$color_g','$color_b')";
mysql_query($query);
mysql_close();
//End of database stuff
header("Content-type: image/jpeg");
$name = stripslashes($_GET['name']);
$size = stripslashes($_GET['size']);
$centre = stripslashes($_GET['centre']);
$font = 'images/sig_maker/fonts/'.stripslashes($_GET['font']).'.ttf';
$fontcolor['r'] = stripslashes($_GET['color_r']); // font color - RED
$fontcolor['g'] = stripslashes($_GET['color_g']); // font color - GREEN
$fontcolor['b'] = stripslashes($_GET['color_b']); // font color - BLUE
$lines = stripslashes($_GET['lines']);
function arrow($im, $x1, $y1, $x2, $y2, $alength, $awidth, $color){
///
}
if(is_numeric($_GET['color']) && $_GET['color'] >= '1' && $_GET['color'] <= '54')
{
$bgpic = 'images/sig_maker/' . $_GET['color'] . '.jpeg';
}
$im = imagecreatefromjpeg($bgpic);
//Calculate, the centre:
for(;;){
list($image_width, $image_height) = getimagesize($bgpic);
list($left_x, , $right_x) = imagettfbbox($size, 0, $font, $name);
$text_width = $right_x - $left_x;
if($image_width > $text_width+5){
break;
}
$size = $size - .5;
if($size == 1){
die('Script not responding to decreasing font size, in other words: try using less letters.');
}
}
$hpadding = ($image_width - $text_width)/2;
$vpadding = ($image_height/2);
$textcolor = imagecolorresolve($im, $fontcolor['r'], $fontcolor['g'], $fontcolor['b']);
if($centre== 'y'){
imagettftext($im, $size, 0, $hpadding,$vpadding, $textcolor, $font, $name);
}else{
imagettftext($im, $size, $angle, $x, $y, $textcolor, $font, $name);
}
imagegif($im);
imagedestroy($im);
//show info
$username="joshuacottom_db";
$password=" ";
$database="joshuacottom_db";
mysql_connect('db4.awardspace.com','joshuacottom_db',' ');
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM sig";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Last Signature</center></b><br><br>";
$i=0;
while ($i < $num) {
?>
<imgsrc="http://gamesigs.co.uk/testcreation.php?<? echo" $color=mysql_result($result,$i,"color");&$name=mysql_result($result,$i,"name");&$centre=mysql_result($result,$i,"centre");&$size=mysql_result($result,$i,"size");&$x=mysql_result($result,$i,"x");&$y=mysql_result($result,$i,"y");&$angle=mysql_result($result,$i,"angle");&$font=mysql_result($result,$i,"font");&$color_r=mysql_result($result,$i,"color_r");&$color_g=mysql_result($result,$i,"color_g");&$color_b=mysql_result($result,$i,"color_b")";?>" alt="the last sig created"
<?
$i++;
}
mysql_close();
?>