Ok, I am using this code to check the form for invalid characters:
This is what $char is:
And $char connects to a form. My problem is that, I only want a-z, A-Z, 0-9, and [ and ] (aka brackets) allowed.
So far only a-z, A-Z, and 0-9 are allowed... I am not sure how to add brackets to that. Help please? Thanks!
Code:
if(preg_match('/^[a-zA-Z0-9]$/', $char)){
REST OF MY CODE HERE
Code:
$char = $_POST['charname'];
So far only a-z, A-Z, and 0-9 are allowed... I am not sure how to add brackets to that. Help please? Thanks!
Comment