lil-eminem300 Posted June 18, 2006 Share Posted June 18, 2006 I am starting to think very poorly of php. How do I make php links open in a new window?Please modify these codes for me so that they open in a new windowCode: 1[code]<?php include("http://www.despair.nu/link.php?uid=1018") ?>[/code]Code: 2[code]<?php readfile("http://www.exentrique.com/link.html?user=lileminem300"); ?>[/code] Link to comment https://forums.phpfreaks.com/topic/12306-new-window/ Share on other sites More sharing options...
deadonarrival Posted June 18, 2006 Share Posted June 18, 2006 What do you mean by "php links"?Why not just print a normal link including the target="_blank" part? Link to comment https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47006 Share on other sites More sharing options...
.josh Posted June 18, 2006 Share Posted June 18, 2006 that's not what those functions do. include() includes the file in your current files, and readfile reads the file. they have nothing to do with displaying links. if you want to display a link on your page and have it open an new window, that's an html thing.<a href='blah.php' target='_blank'>blah</a>if you want to display it through php then you would do something like echo "<a href='blah.php' target='_blank'>blah</a>"; Link to comment https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47007 Share on other sites More sharing options...
lil-eminem300 Posted June 18, 2006 Author Share Posted June 18, 2006 ^^ OH OK, I got that from a rotation site. If I did something like[code]<a target="_blank" href="http://www.despair.nu/link.php?uid=1018">Despair</a>[/code]I would get [a href=\"http://www.despair.nu/link.php?uid=1018\" target=\"_blank\"]http://www.despair.nu/link.php?uid=1018[/a]Its shows two links, and they just didn't put the target bank in their links Link to comment https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47029 Share on other sites More sharing options...
.josh Posted June 18, 2006 Share Posted June 18, 2006 well you need to find in their code where they actually echo out the link and add the target = "_blank" to it then Link to comment https://forums.phpfreaks.com/topic/12306-new-window/#findComment-47030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.