elentz Posted December 15, 2017 Share Posted December 15, 2017 I am in need of a way to make a field in a table show the table a clickable url. Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/ Share on other sites More sharing options...
Barand Posted December 15, 2017 Share Posted December 15, 2017 I've re-read that several times and it still makes no sense. Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554684 Share on other sites More sharing options...
elentz Posted December 15, 2017 Author Share Posted December 15, 2017 (edited) Sorry. Was multitasking badly as I posted the original message I have a CRUD application where we will be entering information into a DB for our customers. We need a system where we can keep track of links for programming their phone systems. All are online and programmed using a browser. We are entering the url into a field in the form and later the url is brought out in a table showing all the different records for all the customers. I am looking for a way to make the url clickable? We have multiple people accessing this report. Edited December 15, 2017 by elentz Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554685 Share on other sites More sharing options...
phpmillion Posted December 15, 2017 Share Posted December 15, 2017 You are looking for a way to make URL clickable? Simply use the <a tag. Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554686 Share on other sites More sharing options...
ginerjm Posted December 15, 2017 Share Posted December 15, 2017 (edited) Even your attempt at re-posting doesn't make a lot of sense. For ex., what does "programmed using a browser" mean? Anyway - you have a url and want to make it clickable so as to "jump" to that site? phpmillion has told you how. Edited December 15, 2017 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554687 Share on other sites More sharing options...
elentz Posted December 15, 2017 Author Share Posted December 15, 2017 ginerjm Yes that is the goal. I did figure it out This does the trick for me: <td><a href="http://<?php echo $row[2];?>">Click Here</a></td> Not pretty but works. Thanks for the nudge to figure it out. Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554690 Share on other sites More sharing options...
NotionCommotion Posted December 15, 2017 Share Posted December 15, 2017 I have a CRUD application where we will be entering information into a DB for our customers. Okay. We need a system where we can keep track of links for programming their phone systems. A link programs a phone system? You mean, you want to keep track of all the links they followed? If so, include a session or cookie in the request or some data in the URL, and store that in the DB. All are online and programmed using a browser. All who? We are entering the url into a field in the form and later the url is brought out in a table showing all the different records for all the customers. Not sure on this one. Are you looking to save the urls that were placed in the form in a DB? Shouldn't be too difficult. I am looking for a way to make the url clickable? As stated, use an anchor tag. We have multiple people accessing this report. And your point is? Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554691 Share on other sites More sharing options...
ginerjm Posted December 15, 2017 Share Posted December 15, 2017 And what is "not pretty" about it? The fact that the link simply shows as "click here"? I can see that. But - when you retrieve the url that is being ref'ed, can you not also retrieve something more descriptive from that same source and use that as the display value of the anchor? Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554694 Share on other sites More sharing options...
phpmillion Posted December 16, 2017 Share Posted December 16, 2017 <td><a href="http://<?php echo $row[2];?>">Click Here</a></td> Not pretty but works. Thanks for the nudge to figure it out. What's wrong about that? It's a normal code to display links. Sure thing, you can always use templating system, so your code will look like: <td><a href="http://{{ some_link }}">Click Here</a></td> but if you are unfamiliar with PHP/HTML, you may find it very difficult to add templating engine to your script. Quote Link to comment https://forums.phpfreaks.com/topic/305919-html-clickable-link-in-a-table-result/#findComment-1554704 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.