ch3m1st Posted July 17, 2007 Share Posted July 17, 2007 I am making a signature for another site where you can click the picture and it takes you to a form where you write a message and it shows up on that picture. I have most of it done but after every line there is some weird characters, I don't know how to get rid of them <?php if(isset($_POST['name'])){ $name = $_POST['name'].": "; $mess = $_POST['message']; $myFile = "messages.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); fwrite($fh, $name.$mess."\n"); fclose($fh); } $file = "messages.txt"; $data = file($file); $im = imagecreatefrompng("sig.png"); $black = imagecolorallocate($im, 0, 0, 0); $lines = count($data)-1; for ($t = $lines; $x<19; $x++){ $str=$data[$t]; imagestring($im, 3, 220, 10 + (($lines-$t) * 10), stripslashes($str), $black); $t--; } header("Content-type: image/png"); imagepng($im); imagedestroy($im); ?> **EDIT: http://www.zendurl.com/ch3m1st/sig.htm && http://www.zendurl.com/ch3m1st/write.php Quote Link to comment Share on other sites More sharing options...
ch3m1st Posted July 17, 2007 Author Share Posted July 17, 2007 I tried changing the txt to htm but that didnt work either.. Quote Link to comment Share on other sites More sharing options...
teng84 Posted July 17, 2007 Share Posted July 17, 2007 dude always explain your question clear you see no ones dares to answer Quote Link to comment Share on other sites More sharing options...
ch3m1st Posted July 17, 2007 Author Share Posted July 17, 2007 dude always explain your question clear you see no ones dares to answer thanks.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.