Re: Text box and hyperlink
With PHP? No. But, you can use JavaScript to accomplish it. Put this into a blank HTML file and see how it works.. is that what you wanted?
Code:
<form name="f">
<script>
<!--
function qs(el) {
if (window.RegExp && window.encodeURIComponent) {
var qe=encodeURIComponent(document.f.q.value);
if (el.href.indexOf("q=")!=-1) {
el.href=el.href.replace(new RegExp("q=[^&$]*"),"q="+qe);
} else {
el.href+="&q="+qe;
}
}
return 1;
}
// -->
</script>
<input name="q" value="">
</form>
<a href="index.html?q=" onClick="return qs(this);">asasd</a>