Well, when it's submitted, it's a string. So really you have a couple options:
1.) Type cast it to integer
2.) Verify with Regular Expressions
3.) Verify with ereg
1.)
$intorchar = (int) $_POST['intorchar']; // Makes it an integer
2.)
if(preg_match('/[0-9]{1,3}/', $_POST['intorchar'])) { /* Integer */ } else { /* Text */ }
3.)
if(ereg('^[0-9]+$', $_POST['intorchar'])) { /* integer */ } else { /* Text */ }
Hope that makes sense.