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
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>
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>';
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now