CodeIgniter Forums
how to send otp to two mobile numbers? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: how to send otp to two mobile numbers? (/showthread.php?tid=73797)



how to send otp to two mobile numbers? - kvanaraj - 06-07-2019

hai
I want to send otp in to two mobile numbers. Is it possible to send?

My otp like '12345678';

for first mobile number: first 4 digit (1234)
second mobile number : last 4 digit (5678)

Need suggestion.


RE: how to send otp to two mobile numbers? - Vicky1818 - 06-07-2019

You can put conditions when OTP ll generate.

For example,

if($mobile_no = "9033xxxxxxx"){
$otp_num = 1234;
}elseif($mobile_no = "800xxxxxxx"){
$otp_num = 5678;
}else{
$otp_num = rand(1000,9999);
}

Hope this example will help you.


RE: how to send otp to two mobile numbers? - badrinathjanghel_gmail.com - 06-07-2019

Yes,

of course you can send otp on two mobile numbers.

In place of doing this you can also send first OTP to mobile number and another OTP to email-id.