3
Sep
Category : learn php script, php function | Tags :function for check mobile browser | No Comments
This is function for check our visitor browser, use mobile browser from his phone, ipod, or other mobile technology.
We can redirect visitor that use mobile browser for make our website mobile friendly.
This is the function :
Continue Reading
Incoming search terms for the article:
checkmobile php,
function checkmobile(){,
check_mobile php,
function checkmobile,
php checkmobile() function to detect mobile device,
php check_mobile(),
php function check_mobile,
php function detection mobile blackberry,
check mobile browser php function,
preg_match(\/2 0 mmp|240x320|400x240|android|avantgo|blackberry|blackberry9530|blazer|cellphone|compal|danger|docomo|elaine|eudora|fennec|googlebot|hiptop|htc|htc_|iemobile|ip(hone|od)|iris|jb5|kindle|kyocera|lg\-tu915 obigo|lg\/u990|lge |lge vx|maemo|mid
29
May
Category : learn php script, php function | Tags :collect last 3 digit number | No Comments
This is function for show your last 3 digit numbers. You can use it for get your costumer phone number for unique payment ID or other purpose.
You can change with number you want to collect
function hide($rp)
{
$rupiah = substr($rp,-3); // you can change 3 with number you want to collect
return $rupiah;
}
$nohp="12345678";
$nomornya=hide($nohp);
echo "$nomornya";
And result will show :
678
This is php sample with form :
<?
if ( isset($_POST["submit"]))
{
function hide($rp)
{
$rupiah = substr($rp,-3); // you can change 3 with number you want to collect
return $rupiah;
}
$nohp=$_POST['nomornya'];
$nomornya=hide($nohp);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>get last 3 digit</title>
</head>
<body>
<?
if ( isset($_POST["submit"]))
{
echo "<b>Your 3 Last digit : $nomornya</b>
<br />
<br />
";
}
?>
<form method="post">
Enter your Number : <input name="nomornya" value="<?=$_POST["nomornya"]?>" />
<input type="submit" value="Submit" name="submit" />
</form>
</body>
</html>
Incoming search terms for the article:
function numbers html