johnseito Posted March 14, 2008 Share Posted March 14, 2008 Hello everyone, I am wondering how to check a users input, such as is the user input number, character, and the length of character, etc. And for example if I create a field in the table as: text, for a supposely number input can I check it if the user is inputting a number instead of text? phone varchar(30); Any code examples or links would be greatly appreciated. thanks Link to comment https://forums.phpfreaks.com/topic/96069-check-user-input/ Share on other sites More sharing options...
AdRock Posted March 14, 2008 Share Posted March 14, 2008 If you are using a form, you could use some regular expressions to check if they are entering the correct data and length Link to comment https://forums.phpfreaks.com/topic/96069-check-user-input/#findComment-491818 Share on other sites More sharing options...
dotBz Posted March 14, 2008 Share Posted March 14, 2008 http://www.php.net/is-numeric http://www.php.net/is-string http://www.php.net/strlen and regular expressions Link to comment https://forums.phpfreaks.com/topic/96069-check-user-input/#findComment-491819 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.