function generate_number_code( $length = 8 ) {
$chars = "0123456789";
$password = substr( str_shuffle( $chars ), 0, $length );
return $password;
}
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Saturday, 28 June 2014
How to get n digit random numers in php?
JS get random Numbers
function getRandom(length) {
var rand = Math.floor(Math.pow(10, length-1) + Math.random() * 9 * Math.pow(10, length-1));
return rand;
}
PHP - Mysql Get date between two date ranges
Fetching records between two date ranges
Between two years SELECT * FROM `dt_tb` WHERE year( dt2 ) between 2004 and 2005 Between two month ranges. SELECT * FROM `dt_tb` WHERE month(dt) between '02' and '08' SELECT * FROM `dt_tb` WHERE month(dt) between '02' and '08' and year(dt) between 2004 and 2005 Between two date ranges SELECT * FROM `dt_tb` WHERE dt BETWEEN '2005-01-01' AND '2005-12-31'
Subscribe to:
Comments (Atom)
Feet/Inches to Meters Converter & Lbs to Kgs Converter
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
-
<?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "HTML email"; $message = " <h...
-
document.onkeydown = myKeyDownHandler; function myKeyDownHandler(event){ alert(event.keyCode) }
-
<?php $date1 = "2015-01-23 00:20"; $date2 = "2015-01-23 05:30"; $seconds = strtotime($date2) - strtotime($date1);...