ianhaney Posted January 15, 2015 Report 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
falkencreative Posted January 15, 2015 Report 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
ianhaney Posted January 16, 2015 Author Report 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
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.