Jump to content

php target blank not going to new page


charlie321

Recommended Posts

Hi..

I know target blank has become a security risk, but I am curious to know if this link is now being disallowed or if I have coded it wrong.  The link works, but it will not go to a new page.  Thanks for any help.

$id = "<a href=pgpage.php?id=" . $idr . "target = '_blank'>" . $partno . "</a>";

Link to comment
Share on other sites

Echo $id to the page, and view the HTML.  What does it show?  I think you will see your HTML is bad and you shouldn't have quotes around target.

PS.  I sometime find doing the following easier to read, and will use {curly braces} when needed.

$id = "<a href=pgpage.php?id='$idr' target = '_blank'>$partno</a>";

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.