Jump to content

Php Link


ianhaney

Recommended Posts

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

Link to comment
Share on other sites

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>
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...