Here's a Javascript counterpart:
Code:
<script type="text/javascript">
window.onload=function(){
document.getElementById('enter').onclick=function(){
document.getElementById('show').innerHTML='Hello <span style="color:#930;">'+document.getElementById('urName').value+'</span> Welcome!';}}
</script>
<div id="show" style="font-family:Arial,helvetica,serif;font-size:15pt;"></div>
<label for="urName">Name: </label><input type="text" id="urName">
<input type="button" value="Enter" id="enter">
and a PHP one:
PHP Code:
<?php
if(ISSET($_POST['urName']))
echo '<div id="show" style="font-family:Arial,helvetica,serif;font-size:15pt;">Hello <span style="color:#930;">'.$_POST['urName'].'</span> Welcome!</div>';
?>
<form method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
<label for="urName">Name: </label><input type="text" id="urName" name="urName">
<input type="submit" value="Enter">
</form>
Hope this gives you a variety of choices.
Bookmarks