I would change 2 to 3 in this part
Code
// we can also check for the range here
// if it's more than 2 characters, then we are out of the range
if(str_len(name_str) > 2)

So we will allow to enter value which is made out of 3 characters.
Then I would convert string into the variable using str_to_num.
And at the end I would check if this variable is higher than 150 or not. If it is, then give error, if it is not then save data.

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung