Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check value is email or mobilenumber using php

if (!(filter_var($_POST["mobile_no"], FILTER_VALIDATE_EMAIL))) {
				$raw_input_length = strlen($mobile_no);
				$phone = preg_replace("/[^d]/", "", $mobile_no);
				if($raw_input_length == strlen($phone)){
					if (strlen($phone) !== 10) {
						$member_mobile_no = '';
						$show_otp = 0;
						$error_box = 1;
						$error = "Please Enter a Valid Mobile Number.";
						$color = "red";
					}
				}
				else{
					$member_mobile_no = '';
					$show_otp = 0;
					$error_box = 1;
					$error = "Please Enter a Valid Email Id.";
					$color = "red";
				}
	    }
Comment

PREVIOUS NEXT
Code Example
Php :: File: C:xampphtdocsmarvellogistikapplicationlibrariesProfiler.php Line: 386 Function: sendDataInHeaders 
Php :: all locales php 
Php :: twig global 
Php :: order table in laravel 
Php :: laravel Undefined index: token on reset 
Php :: php refresh_ttl 
Php :: code to set error for du[licate entry in php 
Php :: prestashop category as homepage 
Php :: display product page title in field cf7 
Php :: get woocommerce customers object 
Php :: php get docblock with reflection 
Php :: pass guzzle client data to view laravel 
Php :: undefined variable require_once 
Php :: openclassroom php 
Php :: MethodNotAllowedHttpException 
Php :: array_map with user functions php and parameter php 
Php :: laravel collection pull 
Php :: get auth guard user laravel 
Php :: laravel get polymorphic names 
Php :: how to create php message 2 
Php :: binding instances laravel 
Php :: Insert Data using modal 
Php :: check website ssl certificate using php openssl_x509_parse 
Php :: wp cpt dashicon 
Php :: install PHP extension "amqp" not found, please install it 
Php :: vendor folder command for custom errors laravel 
Php :: strtolower cyrillic 
Php :: laravel get fetch api request body 
Php :: update php version cpanel 
Php :: doctrine findby criteria 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =