Skip to main content

Posts

Showing posts from August, 2016

How to use Google reCaptcha with Cakephp 3.x

How to use Google reCaptcha with Cakephp To use google reCaptcha with php you can read How to use google recaptcha with PHP . In this tutorial we learn how to use google recaptcha with cakepphp 3.x we need two keys that provide by google .you can get your recaptcha keys from google developer account. 1.first we need to call google recaptcha js so open your projectFolder/src/template/layout/default.ctp or you can call it into your header.ctp <?= $this->Html->script('https://www.google.com/recaptcha/api.js') ?> 2. Now we have to save keys into our project that we can access from anywhere so copy this code and paste it into YourProject/Config/bootstrap.php   Configure::write('google_recatpcha_settings', array(     'site_key'=>'SITEKEY',     'secret_key'=>'SECRETKEY' )); 3.Now open your appConteoller (projectFolder/src/Controller/AppController) Add these code into initialize function of appController public functi

How to Use Bootstrap datepicker

How to Use Bootstrap datepicker bootstrap provides simple and attractive datepicker widget that we can use in html page wihtout any problem  to use bootstrap datepicker with html or php we need to call cdn datepicekr js. INDEX.HTML  <div class="container-fluid">   <div class="row">    <div class="col-md-6 col-sm-6 col-xs-12">     <!-- Form code begins -->     <form method="post">       <div class="form-group"> <!-- Date input -->         <label class="control-label" for="date">Date</label>         <input class="form-control" id="date" name="date" placeholder="MM/DD/YYY" type="text"/>       </div>       <div class="form-group"> <!-- Submit button -->         <button class="btn btn-primary " name="submit" type="submit">Submit</button>