PHP open link, super problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Alienware
Forum Newbie
Posts: 1
Joined: Wed Jan 07, 2009 2:16 am

PHP open link, super problem

Post by Alienware »

Code: Select all

$name = "<a onMouseOver=\"return overlib('Playername: ".$user."', CENTER);\"
 onMouseOut=\"nd();\" href=\"profile.php?player=".$user."\" style=\"\">".$play."</a>";
echo $name." ~ ";
Ok so thats the problem link/code...

Im wanting to open this link in a frame called "main"

i knwo about the principles of target="main" but when i try and put it into the code, the page doesnt load in the main frame, whats mor, the page that this code is on comes up with an error.

Any ideas?
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: PHP open link, super problem

Post by yacahuma »

may I suggest next time writing like this. Not everything has to be php. Actually I find it easier to touch the html as little as possible.
Transforming html into php is not always a good idea. In you example it makes even less sense since you are just echoing it.

Code: Select all

 
<a onMouseOver="return overlib('Playername: <?=$user?>', CENTER);" onMouseOut="nd();" href="profile.php?player=<?=$user?>">Link</a>
 
Post Reply