How to use PHP fonction like md5 in HTML view ?

How to use PHP fonction like md5 in HTML view ?

Hi,
 
I'd like to use md5 ( http://ca3.php.net/md5) in my application for authentification purpose with another application.
 
Can we use PHP in HTML Views ?
 
I'd like to push a string and get back the result to make a if in my HTML view.
 
The sample code is like this :
 

<?php
$str 
'apple';

if (

md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
    echo 
"Voulez-vous une golden ou une spartan?";
    exit;
}


?>

Is it possible ?
 
Thanks,
 
Pascal | nsisolution