Jump to content

Simple question


pspfreak101

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.