Forum Moderators: coopster
function uname(){
if ($_POST["user_name"] == "abc"){
echo "One";
}
else{
echo "Two";
}
<html>
<head>
<title>Echo display test php</title>
</head>
<body>
<?php
echo ((isset($_POST['user_name']) && !empty($_POST['user_name'])) ? strip_tags($_POST['user_name']) : '');
echo "</br>";
echo (isset($_POST['user_name']) && ($_POST['user_name'] == "abc") ? "You typed in abc! Well done" : '');
?>
<form action="" method="post" >
Username: <input type="text" name="user_name">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>