Page 1 of 2 12 LastLast
Results 1 to 10 of 11
Like Tree2Likes

Thread: What wrong this code?

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default 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. #2
    Senior Member something else's Avatar
    Join Date
    Feb 2008
    Location
    if($something){echo 'Status code 404'; }else{ echo 'coding-talk.com';}
    Posts
    1,818
    Thanks
    209
    Thanked 447 Times in 202 Posts
    Rep Power
    0

    Default

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

    [Only registered and activated users can see links. Click Here To Register...]


  3. #3
    Senior Member just_m3.'s Avatar
    Join Date
    Feb 2010
    Location
    Romania
    Posts
    173
    Thanks
    11
    Thanked 72 Times in 27 Posts
    Rep Power
    4

    Default

    Quote Originally Posted by utpal [Only registered and activated users can see links. Click Here To Register...]
    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 at 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!

  4. #4
    Senior Member something else's Avatar
    Join Date
    Feb 2008
    Location
    if($something){echo 'Status code 404'; }else{ echo 'coding-talk.com';}
    Posts
    1,818
    Thanks
    209
    Thanked 447 Times in 202 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by just_m3. [Only registered and activated users can see links. Click Here To Register...]
    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

    [Only registered and activated users can see links. Click Here To Register...]


  5. #5
    Senior Member just_m3.'s Avatar
    Join Date
    Feb 2010
    Location
    Romania
    Posts
    173
    Thanks
    11
    Thanked 72 Times in 27 Posts
    Rep Power
    4

    Default

    Quote Originally Posted by something else [Only registered and activated users can see links. Click Here To Register...]
    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!

  6. #6
    Senior Member something else's Avatar
    Join Date
    Feb 2008
    Location
    if($something){echo 'Status code 404'; }else{ echo 'coding-talk.com';}
    Posts
    1,818
    Thanks
    209
    Thanked 447 Times in 202 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by just_m3. [Only registered and activated users can see links. Click Here To Register...]
    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 at 20:29.
    just_m3. likes this.

    [Only registered and activated users can see links. Click Here To Register...]


  7. #7
    Senior Member just_m3.'s Avatar
    Join Date
    Feb 2010
    Location
    Romania
    Posts
    173
    Thanks
    11
    Thanked 72 Times in 27 Posts
    Rep Power
    4

    Default

    Quote Originally Posted by something else [Only registered and activated users can see links. Click Here To Register...]
    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
    something else likes this.
    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!

  8. #8
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by just_m3. [Only registered and activated users can see links. Click Here To Register...]
    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.

  9. #9
    Senior Member something else's Avatar
    Join Date
    Feb 2008
    Location
    if($something){echo 'Status code 404'; }else{ echo 'coding-talk.com';}
    Posts
    1,818
    Thanks
    209
    Thanked 447 Times in 202 Posts
    Rep Power
    0

    Default

    use my second post

    [Only registered and activated users can see links. Click Here To Register...]


  10. #10
    Junior Member
    Join Date
    Jan 2011
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by something else [Only registered and activated users can see links. Click Here To Register...]
    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

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. What's wrong with this code?
    By s3nzo in forum General Discussion
    Replies: 3
    Last Post: 10-08-11, 17:26
  2. PLS want wrong with my code
    By adex3g in forum Coding Forum
    Replies: 8
    Last Post: 17-01-11, 20:19
  3. Whats wrong with this code
    By icen01 in forum Coding Forum
    Replies: 3
    Last Post: 30-05-10, 06:23
  4. Whats wrong in dis code???
    By slowy in forum Coding Forum
    Replies: 2
    Last Post: 12-05-10, 06:29
  5. Whats Wrong With This Code
    By Rider in forum Site / Script testing and error fixing
    Replies: 6
    Last Post: 17-01-09, 20:22

Bookmarks

Posting Permissions

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

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19