July 18, 2016

How to view web site in fullscreen using HTML5 and jQuery?


Please follow below step and refer this link for more help.

1: First include following two JS in header part between <head> tab,

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script src="//use.fontawesome.com/aa03aaad2f.js"></script>

2: HTML code for just link

<a href="javascript:;" class="fullscreen "><i class="fa fa-arrows-alt"></i> View Fullscreen</a>
 

3: jQuery API code
 
$(".fullscreen-toggle").on("click", function() {
    document.fullScreenElement && null !== document.fullScreenElement ||
    !document.mozFullScreen && !document.webkitIsFullScreen ?
    document.documentElement.requestFullScreen ?
    document.documentElement.requestFullScreen() :
    document.documentElement.mozRequestFullScreen ?
    document.documentElement.mozRequestFullScreen() :
    document.documentElement.webkitRequestFullScreen &&
    document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):
    document.cancelFullScreen ? document.cancelFullScreen() :
    document.mozCancelFullScreen ? document.mozCancelFullScreen() :
    document.webkitCancelFullScreen && document.webkitCancelFullScreen()
});
 
For more details click Here!

Demo

Enjoy!



July 14, 2016

New PHP 7 Alpha for version released this week PHP 7.1.0



One good news for  PHP Fans,

The latest Alpha for PHP 7 has been released this week. PHP 7.1.0 Alpha 3 is available immediately.

Also this week, has your company decided it's time to "do community"? Get some tips on how to build a community presence.

We take a look at the brilliant tiny computer Raspberry Pi, and how to use it to power projects with PHP.

Plus Adam Culp and Cal Evans gave a question and answer session, from a conference organiser's perspective, on how conference talks are selected.

And finally, PHP South Africa has been announced, taking place over three days in September, in Johannesburg. Early Bird tickets are currently on sale.

Click Here for read more.

Enjoy!

Single SQL query with GROUP_CONCAT, DISTINCT and SEPARATOR.



Here is example for use GROUP_CONCAT, DISTINCT and SEPARATOR in single sql query,

Example:

SELECT group_concat(distinct (id) SEPARATOR ', ') AS ID FROM (tablename) WHERE 1=1

Enjoy!

July 13, 2016

Smarty - Display php variable on tpl file.



Hi every one after long time I come back on my blog,

Here some example to display PHP variable on Smarty template (.tpl) file:

1. Simple variable
{$variablename}

2. For count array
{count($arrayVariable)}

3. For if condition
{ if $variable==1}......{/if}

4. For foreach loop on template file
{ foreach $res as $key}
   {$key.id}
   {$key.name}
{/foreach}

Enjoy!

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...