if that is the case, your in the wrong place, PHP can only do this on the server side, you probably want to use javascript to do this
Insert in the head of the page:
Code:
<script language="javascript" type="text/javascript">
function gothere(){
if (document.todo.place.value != ""){
document.location.href=document.todo.place.value;
}
else{
alert("please enter a location!");
}
return false;
}
</script>
Then in the <form> tag, place this somewhere
Code:
onSubmit="gothere()"
or do you want the page to reload with the link on the page?
if that is the case, use javascript again...
Code:
<script language="javascript" type="text/javascript">
function gothere(){
if (document.todo.place.value != ""){
document.golink.innerHTML="<a href="+document.todo.place.value+">"+document.todo.place.value+"</a>";
}
else{
alert("please enter a location!");
}
return false;
}
</script>
and have this DIV on the page where you want the link to appear...
Code:
<div name="todo" id="todo"></div>
hope that this helps somewhat...
Bookmarks