Hi,
I'm trying to edit a PHP thing called Boxxnews that prints news onto your page and stores all the stories in a MySql database.
In the piece of code that runs the script there is a file called ubb.php included. In this .php page can be found:
// This is my link
$story1 = preg_replace('#[url=([a-z]+?://){1}(.?)](.?)[/url]#', '<a href="\1\2" target="$blankpage">\3</a>', $story1);
I added the target="$blankpage" to the piece of code as I wanted all the headlines to open in a seperate window
At the top of this page I have added code saying:
if($blank=="Y") {
$blankpage = "_blank";
}
Basically from the mysql database, a field called blank passses either a Y or a N to the page which has incliuded the ubb.php page.
At the bottom of the ubb.php page I have also added:
return $blankpage;
However when you view source of the page which displays the news it still says:
<a href="http://www.comingsoon.net/dvd/aug03.php" target="$blankpage">
It hasn't changed the $blankpage to _blank.
What am I doing wrong?
Please help!!