Ajax navigation menu (code source)


js File to loading content via a menu, without refresh page using Ajax

Simple PHP / MYSQL / jQUERY Login Script

In this tuto, we will let to know about Ajax login form using jQuey and PHP,
for this login form we need 3 files and they will be :
  1. index.php :
  2.  <!DOCTYPE html>  
     <html>  
      <link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />  
      <script src=" https://code.jquery.com/jquery-2.1.4.min.js"></script>  
     <script src="js/app.js"></script>  
     <head>  
          <meta charset="utf-8">  
          <title>Tuto4free Login</title>  
     </head>  
     <body>  
       <div id="login-form">  
         <h3>Tuto4free</h3>  
         <fieldset>  
           <form action="login.php">  
             <input type="email" id="Email" required   placeholder="Email">   
             <input type="password" id="password" required   placeholder="Password">  
             <input type="submit" id="Log_btn" value="Login">  
             <footer>  
                <div id="err"></div>  
               <p><span class="info">?</span><a href="http://www.tuto4free.com">Lost my password</a></p>  
             </footer>  
           </form>  
         </fieldset>  
       </div>   
     </body>  
     </html>  
     </body>  
     </html>  
    
  3. login.php :
  4.  <?php   
          $pdo = new PDO('mysql:host=localhost;dbname=login', 'root','');  
          $SQL="SELECT * FROM `user` where email=? and Password=? ";  
          $req = $pdo->prepare($SQL);  
          $req->execute(array($_POST['username'],md5($_POST['password'])));  
          $res=$req->fetchAll();       
          if(count($res)==1)  
          {  
               echo "true";  
          }  
          else  
          {  
               echo "false";  
          }  
    
  5. app.js : 
  6.  $(document).ready(function(){  
       $("#Log_btn").click(function(){  
         username=$("#Email").val();  
         password=$("#password").val();  
          $.ajax({  
           type: "POST",  
           url: "login.php",  
           data: "username="+username+"&password="+password,  
           success: function(html){  
            if(html=='true')  
            {  
             $("#login-form").fadeOut();  
            }  
            else  
            {  
               $("#err").html("Wrong username or password");  
            }  
           },  
           beforeSend:function()  
           {  
              $("#err").html("Loading...")  
           }  
         });  
          return false;  
       });  
     });  
    

Windows store Apps grid system


Windows Store is an application store for Microsoft Windows, starting with Windows 8 and Windows Server 2012. The platform can be used to provide listings for desktop applications certified to run on Windows, but is also the primary distribution platform for a new type of mobile app called "Metro-style apps" (common name) or "Windows Store apps" (official name).
wikipedia.org


How to install Prestashop 1.6 Theme



PrestaShop is a free, open source e-commerce solution. It supports payment gateways such as DirecPay, Google Checkout, Authorize.Net, Skrill, PayPal, PayPal Payments Pro (Direct) and EBANX Checkout via their respective APIs. Further payment modules are offered commercially.

PrestaShop is available under the Open Software License and officially launched in August 2007. The software, which is written in PHP and based on the Smarty template engine, is currently used by 165,000 shops worldwide. MySQL is the default database engine. PrestaShop is the winner of the 2010 and 2011 Best Open-source Business Application awards. According to W3Techs, PrestaShop is used by 0.5% of all websites.

C# Multiple Return Values


On DOT Net a function return only one value, if you need to get more the one you can use 'Tuple'
Exemple :
  public Tuple<string, int> Getinfo()  
  {  
    return Tuple.Create("Mouhcin", 24);  
  }  

Try Firefox OS on Windows


Firefox OS (project name: Boot to Gecko, also known as B2G) is a Linux kernel-based open-source operating system for smartphones and tablet computers and is set to be used on smart TVs. It is being developed by Mozilla, the non-profit organization best known for the Firefox web browser.

Firefox OS is designed to provide a complete community-based alternative system for mobile devices, using open standards and approaches such as HTML5 applications, JavaScript, a robust privilege model, open web APIs to communicate directly with cellphone hardware, and application marketplace. As such, it competes with commercially developed operating systems such as Apple's iOS, Google's Android, Microsoft's Windows Phone and Jolla's Sailfish OS as well as other community-based open source systems such as Ubuntu Touch.

Firefox OS was publicly demonstrated in February 2012, on Android-compatible smartphones. In January 2013, at CES 2013, ZTE confirmed they would be shipping a smartphone with Firefox OS, and on July 2, 2013, Telefónica launched the first commercial Firefox OS based phone, ZTE Open, in Spain which was quickly followed by GeeksPhone's Peak+.

Mozilla has also partnered with T2Mobile to make a Firefox OS reference phone dubbed "Flame" which is designed for developers to contribute to Firefox OS and to test apps. (Wikipedia)

Convert HTML to Mobile Apps



In this blog we post I will show you an easy method to convert your Web Application to a Mobile Application using intel xdk
1 - We need to download intel xdk from Here 


2 - Choose import an existing HTML Project and select your project path
3- in the Build  tab choose your production format ( IOS , Android , chrome apps)