Monday, March 27, 2017

How to find out the last inserted id in Mysql with PhP?

How to integrate kcfinder-filemanager in ckeditor(CKEditor in PHP Tutorial)

How to integrate kcfinder-filemanager in ckeditor(CKEditor in PHP Tutorial) 


In this video, you will know how to integrate kcfinder-filemanager in ckeditor
links for ckeditor: http://ckeditor.com/
links for kcfinder https://kcfinder.sunhater.com/integrate

How to Display Mysql Data in a Select List of Bootstrap framework With php pdo?


In this video tutorial you will know to Display Mysql Data in a Select List of Bootstrap framework With php pdo.
Bootstrap link : http://getbootstrap.com/
.php mysql pdo connection

index.php file 



  1. <?Php

  2.   $dbhost = 'localhost';

  3.   $dbname = 'selectlist';  

  4.   $dbuser = 'root';                  

  5.   $dbpass = ''; 

  6.   try{
  7.     $dbcon = new PDO("mysql:host={$dbhost};dbname={$dbname}",$dbuser,$dbpass);

  8.     $dbcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);    

  9.   }catch(PDOException $ex){  

  10.     die($ex->getMessage());

  11.   }

  12.   ?>

  13. <!DOCTYPE html>

  14. <html lang="en">

  15.   <head>

  16.     <meta charset="utf-8">

  17.     <meta http-equiv="X-UA-Compatible" content="IE=edge">

  18.     <meta name="viewport" content="width=device-width, initial-scale=1">

  19.     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  20.     <title>Bootstrap 101 Template</title>

  21.     <!-- Bootstrap -->

  22.     <!-- Latest compiled and minified CSS -->
  23. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  24.   </head>

  25.   <body>

  26.     <h1>Dynamic Select List in php mysql!</h1>

  27.     <div class="col-md-4">

  28.      <div class="form-group">

  29.      <label for="sel1">Select list:</label>

  30.     <select class="form-control" id="sel1">

  31.     <?php

  32.      $sqlquery = $dbcon->prepare('SELECT * FROM selectlist ORDER BY id DESC');
  33.      $sqlquery->execute();

  34.      while($row=$sqlquery->fetch(PDO::FETCH_ASSOC))

  35.      {

  36.        extract($row)

  37.     ?>
  38.     <option>

  39.       <?php

  40.     

  41.      echo $row['title'];

  42.     

  43.     ?>

  44.      </option>

  45.     <?php

  46.     } 

  47.     ?>

  48.   </select>

  49.    </div>

  50.     </div>

  51.     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->

  52.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

  53.     <!-- Latest compiled and minified JavaScript -->

  54. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

  55. </body>
  56. </html>

How Can we Convert MySQL Rows into JSON Format in PHP PDO

How  Can we Convert MySQL Rows into JSON Format in PHP PDO


In this video tutorial you will know How To Parse JSON With PHP
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
 JSON is a data exchange format between web/mobile applications.
It can easily convert data into plain text in human readable format.

Easily understand Get And Post Methods in PhP




Easily understand Get And Post Methods in PhP

           Above Scripts

  1. <?php
  2. $x = 'Hello';
  3. echo $x; 
  4. ?>
  5. <a href= "index.php?id">get</a>
  6. <?php 
  7. if(isset($_GET['id']))
  8. {
  9.     echo '<br>hello i got it';
  10. }
  11. ?>
  12. <form action="index.php" method="post">
  13. <input type="submit" value='post' name="submit">
  14. </form>
  15. <?php 
  16. if(isset($_POST['submit']))
  17. {
  18.     echo '<br>hello i got it';
  19. }
  20. ?>

How To Install Wordpress on localhost


Dynamic autocomplete with bootstrap typeahead.js in php(Video Tutorial)