Results 1 to 3 of 3

Thread: imagettftext() not working

Threaded View

  1. #1
    Join Date
    Aug 2012

    Question imagettftext() not working


    I am trying to make a tracker and the code I have used is valid but
    Warning: Wrong parameter count for imagettftext() in /home/a7265961/public_html/blog/update.php on line 12
    comes up.
    Here is my code
    $submit = $_POST['submit'];
    if($submit) {
    $password = $_POST['password'];
    $status = $_POST['status'];
    $server = $_POST['server'];
    $room = $_POST['room'];
    $lastupdate = "Last Update:".date("Y-m-d H:i:s");
    if($password == "s****") {
    $im = imagecreatefrompng("images/trackerbg.png");
    $colour = imagecolorallocate($im, 0, 0, 0);
    imagettftext($im, 30, 0, 115, 60, $colour, $status);
    imagettftext($im, 30, 0, 120, 95, $colour, $server);
    imagettftext($im, 30, 0, 120, 135, $colour, $room);
    imagettftext($im, 10, 0, 5,  175, $colour, $lastupdate);
    imagepng($im, 'tracker.png');
    echo "Updated!";
    else {
    echo "Incorrect Password! Please try again!";
    else {
    <title>Acess 1 Tracker</title>
    <form action="<?php echo $_['PHP_SELF']; ?>" method="POST">
    <p>Tracker Password: <input type="password" name="password" id="password" value="<?php echo $_POST['password']; ?>"></p>
    <p>Status: <input type="text" name="status" id="status" value="<?php echo $_POST['status']; ?>"></p>
    <p>Server: <input type="text" name="server" id="server" value="<?php echo $_POST['server']; ?>"></p>
    <p>Room: <input type="text" name="room" id="room" value="<?php echo $_POST['room']; ?>"></p>
    <p><input type="submit" name="submit" id="submit" value="Update Tracker"></p>
    What's the mistake and please could you fix it.
    Thanks in advanced.
    Last edited by Cap123; 11-18-2012 at 07:30 AM. Reason: Blocking out password

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center