text box should accept only alphanumeric not special characters in php

81

if(ctype_alnum($string)){
    echo "Yes, It's an alphanumeric string/text";
}
else{
    echo "No, It's not an alphanumeric string/text";
}

Comments

Submit
0 Comments