I got lost in a using strpos() and ltrim()’s. Would anyone be able to help me out with my problem? I’d want the page to only accept inputs that start with “A” or “B” then is immediately followed by an integer. Like the following:
A1 = accepted
B1 = accepted
AB = rejected
1A = rejected
1 = rejected
B123 = accepted
I am using $_GET and the URL is somehow like page.php?id= The numbers actually come from an auto-increment primary key in MySQL so lengths will vary as entries are added.
1 Answer