ianhaney Posted January 15, 2015 Report Share Posted January 15, 2015 Hi I am making a script using the following http://www.killersites.com/community/index.php?/topic/3064-basic-php-system-view-edit-add-delete-records-with-mysqli/ all works perfect, just got one little issue, on the view-paginated.php page I am trying to make a website a link that opens in a new tab The line of code is below echo '<td>' . $row[5] . '</a></td>'; How would I make that a link as tried a few things and don't seem to work Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 15, 2015 Report Share Posted January 15, 2015 What data does "$row[5]" contain? One way or another, you need a link that opens up a new tab: <a href="your-link.html" target="_blank">Link Text</a> If $row[5] contains a website URL, for example, "http://google.com", you would do something like this: echo '<td><a href="' . $row[5] . '" target="_blank">' . $row[5] . '</a></td>'; which would result in: <a href="http://google.com" target="_blank">http://google.com</a> Quote Link to comment Share on other sites More sharing options...
ianhaney Posted January 16, 2015 Author Report Share Posted January 16, 2015 Hi Ben Thank you for the reply Yeah I soon thought after of doing it the way you mentioned echo '<td><a href="' . $row[5] . '" target="_blank">' . $row[5] . '</a></td>'; 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.
Note: Your post will require moderator approval before it will be visible.