charlie321 Posted March 28, 2019 Share Posted March 28, 2019 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>"; Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted March 28, 2019 Share Posted March 28, 2019 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>"; Quote Link to comment Share on other sites More sharing options...
ginerjm Posted March 28, 2019 Share Posted March 28, 2019 Or simply open up the source in your browser to see what html you are generating. I think you may also need a space after the current id value to separate the target attribute from the id one. 1 Quote Link to comment Share on other sites More sharing options...
charlie321 Posted March 28, 2019 Author Share Posted March 28, 2019 Thanks very much for your help. It was the space that fixed this..... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.