ok, you still can't call a php function on a javascript event, which is what your code is trying to do.
What you need to do is use your php to print out the html code but make the onclick event itself the value.
Something like this.
<?PHP
if ($user == $registered){
$onclick = "window.location='http://www.webs.com/page1.html'";
}
else {
$onclick = "window.location='http://www.webs.com/page2.html'";
}
?>
</script>
<form>
<input type='button' name='butt' value='Apply Online' onClick='
<?php echo $onclick; ?>
' style='height :2em; width :7em; font-weight:bold; font-size:0.7em' >
</form>
Obviosly you will replace user and registered with whatever you use to check users registration...
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
Offline 86 posts
since Nov 2007