ryanwood4 Posted June 14, 2009 Share Posted June 14, 2009 I need the link below to open in the parent window, is this possible, and how would I go about it. Code Snippet: echo "<td><h7><b><a href='$url'>".stripslashes($row['article_title'])."</h7></b></a>"; Full Code: <?php $con = mysql_connect("localhost","xxxx","xxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("f1times_articles", $con); $result = mysql_query("SELECT * FROM n2s_article ORDER BY article_id DESC LIMIT 1,3"); echo "<table border='0'> <tr> </tr>"; while($row = mysql_fetch_array($result)) { $url = $row['article_url'] . "-" . $row['article_id'] . ".html"; echo "<tr>"; echo "<td><h7><b><a href='$url'>".stripslashes($row['article_title'])."</h7></b></a>"; echo "<p>".stripslashes($row['article_teaser'])."<br /></p></td>"; } mysql_close($con); ?> Thanks Link to comment https://forums.phpfreaks.com/topic/162136-solved-php-link-open-in-parent-help-please/ Share on other sites More sharing options...
mattal999 Posted June 14, 2009 Share Posted June 14, 2009 Try changing: <?php echo "<td><h7><b><a href='$url'>".stripslashes($row['article_title'])."</h7></b></a>"; ?> To: <?php echo "<td><h7><b><a href='$url' target=_parent>".stripslashes($row['article_title'])."</h7></b></a>"; ?> Link to comment https://forums.phpfreaks.com/topic/162136-solved-php-link-open-in-parent-help-please/#findComment-855567 Share on other sites More sharing options...
ryanwood4 Posted June 14, 2009 Author Share Posted June 14, 2009 Well that was simple, thanks. I tried the html version target="_parent" so I was almost there. Cheers Link to comment https://forums.phpfreaks.com/topic/162136-solved-php-link-open-in-parent-help-please/#findComment-855568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.