What wrong this code?
Started on the old forum in April 2012 · view the original in the archive · old links redirect here
there is quite a lot wrong with it ..... but question is are you trying to print or echo the link in php?
utpal wrote: Any one tell me what wrong this 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
echo"<a href='".$file." onclick=".top()."'>-Download Now-</a>";
onclick="top()" missed dots 😛
onclick=".top()."
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files (x86)\VertrigoServ\www\test.php on line 4
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!
echo"<a href='".$file." onclick=".top()."'>-Download Now-</a>";
still wrong :/
echo "<a href='".$file."' onclick='top()'>-Download Now-</a>";
javascript needs to be inside the string
something else wrote: still wrong :/
echo "<a href='".$file."' onclick='top()'>-Download Now-</a>";javascript needs to be inside the string
ooops 😀 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!
just_m3. wrote: ooops 😀 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:
echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>";
something else wrote: if it was a php function your post would be still wrong as your missing two ' eg:
echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>";
OMFG i'm so dizzy today 🤣 (nasty day at work) ... missed that too ... 😛
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 😛
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!
just_m3. wrote: OMFG i'm so dizzy today 🤣 (nasty day at work) ... missed that too ... 😛
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
<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
echo "<a href='".$file."' onclick='".top()."'>-Download Now-</a>";
this code also Fatal error.. Please help me.
something else wrote: use my second post :)
That show
Fatal error: Call to undefined function top() in /home/mysite/public_html/a/file.php on line 55