PHP CODE FOR GENERATING SERIAL NUMBER


<?php
require("connect.php");
$button = $_POST['button'];
if ($button) {
for ($i=0; $i <= 5; $i++) {
$alpha= mt_rand();
$bet  = mt_rand();
$sn= srand();
$count = $alpha.$bet;
$display = substr($count,1,15);
$sen= substr($alpha.$bet.$sn,1,8);
echo "<br/>".$display;
$serial = "RF".$sen;
echo "<br/>".$serial;

}
}mysql_query("INSERT INTO encrypted(pin,sn) VALUES ('$display','$serial')");
?>