Jump to content

checking user input


LanceT

Recommended Posts

 if ( !preg_match('/^[a-zA-Z\" "]*$/', $name) )
       {
        error('The Name that you have given is not valid.\\n'.
                'Please try again.');
          }

 

if (preg_match('#^[0-9]{3}-[0-9]{7}$#', $hp))
        {}else{
        error('The Handphone Number that you have given is not Valid.\\n'.
                  'Please try again.');
           }

Link to comment
https://forums.phpfreaks.com/topic/47985-checking-user-input/#findComment-234490
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.