Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts

    I cant get this to work..

    hey, ill post my whole page, can you help me fix it because i only get errors i just want to create a signature thats updates everything thats updated in the database but its not working only getting errors..


    Parse error: syntax error, unexpected T_STRING in /public_html/stats.php on line 70


    stats.php *click*

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Parse error: syntax error, unexpected T_STRING in /public_html/stats.php on line 70
    Post some code around that line.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Post some code around that line.
    just click on stats.php, it'll show pastebin..

  • #4
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts
    PHP Code:
    $sig "./sig".$info['name'] . ".jpg";
    imagejpeg ($sig);
    $sigdir "<img src="/".$sig . ">";
    Print $sigdir;
    }
    ?>
    </div>
          </div>
    line 70 =>  <div class="
    post">
        <div class="
    entry"></div>
          </div>
        </div>
        <!-- end content --> 

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    PHP Code:
    $sigdir "<img src="/".$sig . ">"; 
    should be something like
    PHP Code:
    $sigdir '<img src="/'.$sig.'">'
    Last edited by abduraooft; 03-07-2009 at 01:30 PM. Reason: removed echo
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Warning: Cannot modify header information - headers already sent by (output started at /public_html/stats.php:7) in /public_html/stats.php on line 8

    Warning: imagejpeg(): supplied argument is not a valid Image resource in public_html/stats.php on line 63

    wuts this?

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    Line => 7 <?php header ("Content-type: image/pjpeg"); ?>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    <!--
    .style3 {font-size: 24px}
    .style4 {font-size: 13px}
    -->
    </style>
    </head>
    PHP Code:
    $string "Name:".$info['name'] . "<br>Level:".$info['level'] . "<br>Exp:".$info['exp'] . "";
    $font  4;
    $width  ImageFontWidth($font)* strlen($string) ;
    $height ImageFontHeight($font) ;

    $im ImageCreateFromjpeg("./sig.jpg");
    $x=imagesx($im)-$width ;
    $y=imagesy($im)-$height;
    $background_color imagecolorallocate ($im255255255); //white background
    $text_color imagecolorallocate ($im00,0);//black text
    imagestring ($im$font$x$y,  $string$text_color);

    $sig "./sig".$info['name'] . ".jpg";
    Line 63 ==> imagejpeg ($sig);
    $sigdir '<img src="/'.$sig.'">';
    Print 
    "<p>Now a signature for ".$info['name'] . " Generated!";
    Print 
    $sigdir;
    }
    ?>
    </div> 

  • #7
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Yes, that echo is not required there before $sigdir
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #8
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    Yes, that echo is not required there before $sigdir
    hm, there is no picture popping up now :X can you fix that please?

  • #9
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Change:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <?php header ("Content-type: image/pjpeg"); ?>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    <!--
    .style3 {font-size: 24px}
    .style4 {font-size: 13px}
    -->
    </style>
    </head>
    To:

    PHP Code:
    <?php header ("Content-type: image/pjpeg"); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    <!--
    .style3 {font-size: 24px}
    .style4 {font-size: 13px}
    -->
    </style>
    </head>
    Header needs to be before any output

  • #10
    New Coder
    Join Date
    Mar 2009
    Posts
    43
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sea4me View Post
    Change:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <?php header ("Content-type: image/pjpeg"); ?>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    <!--
    .style3 {font-size: 24px}
    .style4 {font-size: 13px}
    -->
    </style>
    </head>
    To:

    PHP Code:
    <?php header ("Content-type: image/pjpeg"); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <style type="text/css">
    <!--
    .style3 {font-size: 24px}
    .style4 {font-size: 13px}
    -->
    </style>
    </head>
    Header needs to be before any output
    if i do that, i only see the site like this:

    http://mysite.eu/index.php not any content in the site.. try it yourself,

    click here and fill in Pandabeer > works now but no signature
    Last edited by Pandabeer; 03-08-2009 at 01:39 PM. Reason: sadsda

  • #11
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Hummm....

    This is a quote from php.net:
    Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
    http://us2.php.net/header


  •  

    Posting Permissions

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