Translate

Tuesday, 24 September 2013

Characters change in upper&lower Case using PHP

Screenshot:
             


 Display:
                
 
index.php:

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="200" border="1" cellspacing="0" cellpadding="5" id="tbl">
    <tr>
      <th>Characters Change in PHP</th>
    </tr>
    <tr>
      <td><label for="name">Name</label>
      <input type="text" name="name" id="name" /></td>
    </tr>
  
    <tr>
      <td align="center"><input type="submit" name="submit" id="submit" 
      value="Submit" /></td>
    </tr>
  </table>
</form>
</body>

Coding:

<?PHP
if (isset($_POST['submit'])) 
{

$full_name = $_POST['name'];
$full_name = ucwords( $full_name );
$change_to_lowercase = "CHANGE THIS";
$change_to_lowercase = strtolower($full_name);

$change_to_uppercase = "change this";
$change_to_uppercase = strtoupper($full_name);
}
?>
Apply After Closed html tag
<?php
echo"$full_name ";

echo"$full_sentence";

echo"$change_to_lowercase";

echo"$change_to_uppercase";

?>

No comments:

Post a Comment