Home > Mobile >  Add full website link in my html table, when I only add address of token in it
Add full website link in my html table, when I only add address of token in it

Time:07-31

I have the following code in html table

<td style="color:#EFE1CE"><?php echo $checkSqlRow["ADDRESS"]; ?></td>

In this table I have different cryptocurrency (bsc/btc/pologon eg.) and on each one I have different tokens. In this column ["ADDRESS"] I want to display the address of any each token, (I got it working) But how can can I do the following. If I add a address for bscscan.com,(xo3efe..............) and I click on the address it must open the address in bscscan or ethscan websites. Is this possible, any sample on this will help me to understand how it is working

So if I put in 0x0f6f69b5bfcc8140084f484f063177ee91e13809, then when I click on it, it must open like this h@@ps://bscscan.com/token/0x0f6f69b5bfcc8140084f484f063177ee91e13809

CodePudding user response:

You need to use the anchor tag, like this -

<td style="color:#EFE1CE">
<a href='https://bcscan.com/token/<?php echo $checkSqlRow["ADDRESS"]; ?>'>Name Of Currency</a></td>

Name Of Currency is whatever you want to appear in the cell. href declares the link to go to when clicked.

CodePudding user response:

Thank you got it to work with help from Rohit, did just add second part

<a href="https://bscscan.com/token/<?php echo $checkSqlRow["ADDRESS"]; ?>">
                                <?php echo $checkSqlRow["ADDRESS"]; ?>
  • Related