I have this:
$to_put .= $ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."|"<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover="alert('.$Info.')"></img>
I get a T_STRING error, please help. I'm not all that good at php.
tangoforce
05-27-2011, 10:12 AM
Try this:
$to_put .= $ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."|<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover=\"alert('.$Info.')\"></img>";
//Or even this:
$to_put .= "$ServerIP|$Port$Password|$Hamachi|$Owner|<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover=\"alert('.$Info.')\"></img>";
tomharto
05-27-2011, 12:27 PM
I have this:
$to_put .= $ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."|"<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover="alert('.$Info.')"></img>
I get a T_STRING error, please help. I'm not all that good at php.
The code tango posted should work fine, your problem was after $Owner."| you dont need the other ". It should just read $Owner."|<img ...... etc
Can someone tell me what I did wrong?
http://www.forthelols.com
the onmouseover="alert('TEST')" doesn't work.
tangoforce
05-28-2011, 12:13 AM
Thats not a php issue - it's javascript so you should really ask in that forum.
Looking at your source though, you have an alert with a lot of html in. The alert starts like alert(' and then you have lots of html also using the ' character (so the javascript engine doesn't know where it really stops).
To fix this you need to escape all the ' characters with this slash \ - so it looks like \' all the way through the html inside the alert() function.
I have this:
$to_put .= $ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."|<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover=\"alert('$Info\')\"></img>
am i missing something?
tomharto
05-28-2011, 11:46 AM
$to_put .= $ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."|<img src=\"http://www.ceepus.info/images/icons/InfoIcon20.gif\" onmouseover=\"alert('".$Info."')\"></img>
tangoforce
05-28-2011, 01:39 PM
@tomharto even that is wrong.
There is no "; on the end.
I'v already told the op what is wrong with his code, its down to him to listen.