Professional Documents
Culture Documents
Exp.html
<html>
<head>
</head>
<body>
</body>
</html>
Exception.php
?php
$name=$_POST['strg'];
$age=$_POST['num'];
try
if(preg_match('/[^a-z]/i',$name))
{
throw new NameException();
elseif(preg_match('/[^0-9]/i',$age))
else
echo"It is valid<br>";
catch(NameException $e)
catch(AgeException $e)
?>