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 browser php function,
php check_mobile(),
php checkmobile() function to detect mobile device,
php checkmobile,
php check mobile,
Learn PHP from mobile,
JB5 $CE,
funktion checkmobile php
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>