php - Billing form - Request for more information if entered data match with a number -


can me? i'm trying create billing info form, , if customer enter example 5120293213632438 i'll use 'substr' first 6 numbers, if 6 numbers match 512029, 537030, 432049, etc... i'll request more info -> vat number , id.

<form action="validate.php" method="post">   <p>credit card number : <input type="text" name="cc" /></p>   <p><input type="submit" value="next"></p> </form> 

validate.php

<?php $vbv = substr($_post['cc'], 6); if($vbv == '512029')     $flag = strstr($bin, $needle);     echo "ok"; else      echo "i'm not vbv"; ?> 

<?php ini_set('display_errors', 1);  $array=array(512029, 537030, 432049);  //array of start 6 digits want  match  $cc='5120293213632438';//credit card no's want match.  if(in_array(substr($cc, 0,6),$array)) {     echo "first 6 digit matched"; } 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -