What wrong this code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What wrong this code?

    Any one tell me what wrong this code?
    Code:
    <a href='".$file." ;="" onclick="top()"'>-Download Now-</a>
    It show
    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/mysite/public_html/a/file.php on line 55
    Please any one help me

    #2
    there is quite a lot wrong with it ..... but question is are you trying to print or echo the link in php?

    Comment


      #3
      Originally posted by utpal View Post
      Any one tell me what wrong this code?
      Code:
      <a href='".$file." ;="" onclick="top()"'>-Download Now-</a>
      It show
      Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/mysite/public_html/a/file.php on line 55
      Please any one help me
      PHP Code:
      echo"<a href='".$file." onclick=".top()."'>-Download Now-</a>"
      onclick="top()" missed dots :p

      onclick=".top()."

      Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files (x86)\VertrigoServ\www\test.php on line 4
      Last edited by just_m3.; 10.04.12, 20:14.
      This is ten percent luck, twenty percent skill
      Fifteen percent concentrated power of will
      Five percent pleasure, fifty percent pain

      And a hundred percent reason to remember the name!

      Comment


        #4
        Originally posted by just_m3. View Post
        PHP Code:
        echo"<a href='".$file." onclick=".top()."'>-Download Now-</a>"
        still wrong :/
        PHP Code:
        echo "<a href='".$file."' onclick='top()'>-Download Now-</a>"
        javascript needs to be inside the string

        Comment


          #5
          Originally posted by something else View Post
          still wrong :/
          PHP Code:
          echo "<a href='".$file."' onclick='top()'>-Download Now-</a>"
          javascript needs to be inside the string
          ooops :D m'a bad .. i didn't knew that top() is from js function ..
          This is ten percent luck, twenty percent skill
          Fifteen percent concentrated power of will
          Five percent pleasure, fifty percent pain

          And a hundred percent reason to remember the name!

          Comment


            #6
            Originally posted by just_m3. View Post
            ooops :D m'a bad .. i didn't knew that top() is from js function ..
            if it was a php function your post would be still wrong as your missing two '
            eg:
            PHP Code:
            echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>"
            Last edited by something else; 10.04.12, 20:29.

            Comment


              #7
              Originally posted by something else View Post
              if it was a php function your post would be still wrong as your missing two '
              eg:
              PHP Code:
              echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>"
              OMFG i'm so dizzy today (nasty day at work) ... missed that too ... :p

              PHP Code:
              echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>"
              how's it now ?

              but that's why you are here .. to fix things !


              and let me tell ya ' one more thing about another day like this .. i wass so dizzy that i didn't knew why listing all data from database ain't work. (missed while function !)

              but that's another part of me .. haha .. tnx for that one :p
              This is ten percent luck, twenty percent skill
              Fifteen percent concentrated power of will
              Five percent pleasure, fifty percent pain

              And a hundred percent reason to remember the name!

              Comment


                #8
                Originally posted by just_m3. View Post
                OMFG i'm so dizzy today (nasty day at work) ... missed that too ... :p

                PHP Code:
                echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>"
                how's it now ?

                but that's why you are here .. to fix things !


                and let me tell ya ' one more thing about another day like this .. i wass so dizzy that i didn't knew why listing all data from database ain't work. (missed while function !)

                but that's another part of me .. haha .. tnx for that one :p
                My java scripts is
                Code:
                <script type="text/javascript">
                function top()
                {
                window.open("http://google.com","funlive","width=1%, height=1%, toolbar=no,location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes");
                }
                
                </script>
                and
                PHP Code:
                echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>"
                this code also Fatal error..
                Please help me.

                Comment


                  #9
                  use my second post

                  Comment


                    #10
                    Originally posted by something else View Post
                    use my second post
                    That show
                    Code:
                    Fatal error: Call to undefined function top() in /home/mysite/public_html/a/file.php on line 55

                    Comment


                      #11
                      this one:
                      PHP Code:
                      echo "<a href='".$file."' onclick='top()'>-Download Now-</a>"

                      Comment

                      Working...
                      X