You can easily validate with the help of ctype_alpha function.
<?php
$formvalue = "am I alphanumeric or not";
if(ctype_alpha($formvalue)) { echo "Yes I am!"; } else { echo "No I'm not!"; }
?>
In this case printing "No I'm not!" because $formvalue contains spaces.