pspfreak101 Posted October 13, 2008 Share Posted October 13, 2008 On my downloads page I'm displaying my data like this, but for the $dlink it needs to be a link so people can just click on it rather copy and paste <? $sql = "SELECT * FROM downloads"; $result = mysql_query ($sql); while ($row = mysql_fetch_array($result)) { $app= $row["app"]; $uploadby= $row["uploadby"]; $catagory= $row["catagory"]; $descrip= $row["descrip"]; $dlink= $row["dlink"]; echo "$app<br>"; echo "$uploadby<br>"; echo "$catagory<br>"; echo "$descrip<br>"; echo "<a href="$dlink">$dlink</a><p>"; } ?> Link to comment https://forums.phpfreaks.com/topic/128245-simple-question/ Share on other sites More sharing options...
trq Posted October 13, 2008 Share Posted October 13, 2008 echo "<a href='$dlink'>$dlink</a><p>"; Link to comment https://forums.phpfreaks.com/topic/128245-simple-question/#findComment-664203 Share on other sites More sharing options...
redarrow Posted October 13, 2008 Share Posted October 13, 2008 sorry was going to say use a book mark code <script type="text/javascript"> /*********************************************** * Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ /* Modified to support Opera */ function bookmarksite(title,url){ if (window.sidebar) // firefox window.sidebar.addPanel(title, url, ""); else if(window.opera && window.print){ // opera var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } else if(document.all)// ie window.external.AddFavorite(url, title); } </script> Link to comment https://forums.phpfreaks.com/topic/128245-simple-question/#findComment-664206 Share on other sites More sharing options...
pspfreak101 Posted October 13, 2008 Author Share Posted October 13, 2008 Thanks Link to comment https://forums.phpfreaks.com/topic/128245-simple-question/#findComment-664208 Share on other sites More sharing options...
redarrow Posted October 13, 2008 Share Posted October 13, 2008 Here another cool feature mate let users press a select button to select code or info... like the forum does <script language="Javascript"> function selectAll(theField) { var tempval=eval("document."+theField) tempval.focus() tempval.select() } </script> <form name="test"> <a href="javascript:selectAll('test.select1')">Select All</a> <br> <textarea name="select1" rows=10 cols=20> redarrow loves php </textarea> </form> Link to comment https://forums.phpfreaks.com/topic/128245-simple-question/#findComment-664220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.