i have to store url in database and retrieve it i am currently using
but the url retrieved appears asa text and a hyperlink to the that url.help me out with this.i want the retrieved url to be a hyperlink referring to that url
Code:
<html>
<head>
<script type="text/javascript">
function show()
{
var s=document.se.key.value;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txt").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","s1.php?q="+s,true);
xmlhttp.send();
}
</script>
</head>
<body>
<form name="se" action="s1.php" method="get">
<input type="text" name="key" value="" />
<input type="button" name="query" value="search" onclick="show();" />
<span id="txt"></span>
</form>
</body>
</html>
Comment