Any ideas what the error is in this code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scroto
    Confirmed User
    • Nov 2005
    • 2804

    #1

    Any ideas what the error is in this code?

    Getting an error with a script...

    Parse error: syntax error, unexpected T_LNUMBER on line 31

    31 would be the line starting with print

    Code:
    <?php if($get[avatar] == '') {
      print "<img src=http://$site_url/avatars/non.gif width="80" height="80">";
    }else{ print "<img src=$get[avatar] width="80" height="80">"; } ?>
    any ideas?
  • jimbona
    Confirmed User
    • Jan 2007
    • 190

    #2
    Code:
    <?php if(empty($get["avatar"])) {
      print "<img src='http://$site_url/avatars/non.gif' width=\"80\" height=\"80\">";
    }else{ print "<img src='".$get["avatar"]."' width=\"80\" height=\"80\">"; } ?>
    Thanks
    Paul
    Thunder-Ball.net - Member

    Comment

    • Scroto
      Confirmed User
      • Nov 2005
      • 2804

      #3
      Originally posted by jimbona
      Code:
      <?php if(empty($get["avatar"])) {
        print "<img src='http://$site_url/avatars/non.gif' width=\"80\" height=\"80\">";
      }else{ print "<img src='".$get["avatar"]."' width=\"80\" height=\"80\">"; } ?>
      thanks man, works good

      Comment

      • marketsmart
        HOMICIDAL TROLL KILLER
        • Dec 2004
        • 20419

        #4
        Originally posted by jimbona
        Code:
        <?php if(empty($get["avatar"])) {
          print "<img src='http://$site_url/avatars/non.gif' width=\"80\" height=\"80\">";
        }else{ print "<img src='".$get["avatar"]."' width=\"80\" height=\"80\">"; } ?>
        way to help out.. nice to see acts of kindness....

        Comment

        • jimbona
          Confirmed User
          • Jan 2007
          • 190

          #5
          @scroto No worries, glad it works.
          @marketsmart Guess its default mode lol, what I do on a daily basis for other forums ;)
          Thanks
          Paul
          Thunder-Ball.net - Member

          Comment

          • Scroto
            Confirmed User
            • Nov 2005
            • 2804

            #6
            yeah kind of sad that i've been after the developer of the actual script for 4 days, but come here and get a quick fix in 5 minutes

            Comment

            • ExLust
              Confirmed User
              • Aug 2008
              • 3223

              #7
              Good job, jim!

              BE A PARTNER

              Comment

              • Zuzana Designs
                All Your Design Needs
                • Feb 2005
                • 20896

                #8
                nice to see good peeps

                Website Design - Consulting - Development
                sarah [at] zuzanadesigns.com - See Our Work

                Comment

                Working...