PHP script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheswaran
    New Member
    • Mar 2007
    • 190

    #16
    Have u checked that logo extension got coorectly for example logo.png. If you echo any values using single code, for example
    Code:
    <?
     echo '<img src="admin/fotos/logo.".$ext."">
    ?>
    
    then you must add ". ." in variables.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #17
      Originally posted by maheswaran
      Have u checked that logo extension got coorectly for example logo.png. If you echo any values using single code, for example
      Code:
      <?
       echo '<img src="admin/fotos/logo.".$ext."">
      ?>
      
      then you must add ". ." in variables.
      That won't work - and will definitely throw an error.

      The correct PHP would look like:
      Code:
      <?
       echo "<img src='admin/fotos/logo" . $ext . "'>";
      ?>
      Furthermore, please do not double post your questions.

      Comment

      • maheswaran
        New Member
        • Mar 2007
        • 190

        #18
        i think your code is wrong

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #19
          Originally posted by maheswaran
          i think your code is wrong
          Would you care to clarify?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #20
            the dot between file name and file extension is missing. there is also the required alt attribute missing.

            Comment

            • maheswaran
              New Member
              • Mar 2007
              • 190

              #21
              while using "" there is no need to add ". ." to declearing values

              Comment

              • Dormilich
                Recognized Expert Expert
                • Aug 2008
                • 8694

                #22
                Originally posted by maheswaran
                while using "" there is no need to add ". ." to declearing values
                that’s a matter of personal preference and not an error. besides you see the variables way better in highlighted source code. not sure you can do that with function call, too.

                Comment

                • Markus
                  Recognized Expert Expert
                  • Jun 2007
                  • 6092

                  #23
                  Originally posted by maheswaran
                  while using "" there is no need to add ". ." to declearing values
                  This does not make my code 'wrong'. Also, you are not declaring variables when you concatenate them into strings.

                  Mark.

                  Comment

                  • Markus
                    Recognized Expert Expert
                    • Jun 2007
                    • 6092

                    #24
                    Originally posted by Dormilich
                    the dot between file name and file extension is missing. there is also the required alt attribute missing.
                    Come on...

                    Comment

                    • Dormilich
                      Recognized Expert Expert
                      • Aug 2008
                      • 8694

                      #25
                      Originally posted by Markus
                      Come on...
                      guess how many people don’t know that?

                      Comment

                      • Markus
                        Recognized Expert Expert
                        • Jun 2007
                        • 6092

                        #26
                        Originally posted by Dormilich
                        guess how many people don’t know that?
                        That doesn't make my PHP wrong, which is what I was questioning ;)

                        Comment

                        • matheussousuke
                          New Member
                          • Sep 2009
                          • 249

                          #27
                          Thanks a lot, guys, but I caught another one. The one one who made this one (of this post) must had make it just for making people angry. I now declare this post closed. Thank you very much.

                          Comment

                          Working...