soundsticks Posted March 26, 2013 Share Posted March 26, 2013 How to add country code if user doesn't enter the country code when they register? If user did enter the country code it will skip and store it into database, if user doesn't enter then system will add the country code and store to database. How can I do that? Quote Link to comment Share on other sites More sharing options...
haku Posted March 26, 2013 Share Posted March 26, 2013 How do you intended to determine their country code if they don't enter one? Quote Link to comment Share on other sites More sharing options...
soundsticks Posted March 27, 2013 Author Share Posted March 27, 2013 I have done in this way. if (preg_match('/^01/', $_POST['mobile'])) { ... } elseif (preg_match('/^60/', $_POST['mobile'])) { ... } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.