<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
  <head>
   <title> strtoupper.php </title>
   <meta charset="UTF-8">
   <meta name="Author" content="">
   <meta name="Keywords" content="">
   <meta name="Description" content="">
  </head> <body>
 <form method="post" action="">
  <input type="text" name="usrname" value=<?php echo '"' . (isset($_POST["usrname"])?$_POST["usrname"]:"") . '"' ?> ><br>
  <input type="submit">
 </form>
 <br>usrname:<br><?php
 if(isset($_POST["usrname"]))
 {
  echo strtoupper($_POST["usrname"]);
 }?>
 <hr>
  </body>
 </html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
  <head>
   <title> strtoupper.php </title>
   <meta charset="UTF-8">
   <meta name="Author" content="">
   <meta name="Keywords" content="">
   <meta name="Description" content="">
  </head> <body>
  <script type="text/javascript">
  function show_str()
  {
   str=document.getElementById("username").value;
   alert(str.toUpperCase());
  } </script>
 <form method="post" action="">
  <input id="username" type="text" name="usrname" value=<?php echo '"' . (isset($_POST["usrname"])?$_POST["usrname"]:"") . '"' ?> ><br>
  <input type="submit" οnclick="show_str()">
 </form>
 <br>usrname:<br><?php
 if(isset($_POST["usrname"]))
 {
  echo strtoupper($_POST["usrname"]);
 }?>
 <hr>
  </body>
 </html>