Coder Social home page Coder Social logo

todos's Introduction

ToDo app using jQuery, php, Mysql/browser local storage

demo

Mysql db stores todos of user, using ajax for GET/POST. Mysql needs connected before runing this app.

DB Schema -

Create an empty database first like say todos and then you can generate dummy data by running file localhost/todo-jquery-php-mysql/includes/dump-sql.php in your browser as mentinoned below -

Tables

  1. user (id, first_name, last_name, email)
  2. todo (id, user_id, title, completed, date_time)

DB connection

  • Edit file localhost/todo-jquery-php-mysql/includes/db-config.php file and change constant DB_NAME, DB_USER, DB_PASSWORD, DB_HOST

To create dummy db -

After successful connection you can use follwing file to create a dummy database using follwing steps

  • Edit file /includes/dump-sql.php and change sql quries as you want.
  • Type in browser localhost/todo-jquery-php-mysql/includes/dump-sql.php
  • Hit enter

Local Storage instead of DB

  • There is an option for you to use browser local storage instead of db

To use local storage -

  • by default var useLocalStorage = true;
  • Edit file /js/app.js and change variable useLocalStorage value to true/false.
  • thats it!!!

To run app

To run on local try with mamp/xampp/wamp/lamp...etc software

  • Start php server
  • Start mysql server
  • Place downloaded todo-jquery-php-mysql folder in www/htdocs web directory
  • Type in browser localhost/todo-jquery-php-mysql
  • Hit enter

Credit

  • Thanks to TodoMVC for creating jquery version of Todo.
  • Thanks to Micah Carrick for PHP MySQL Database Class.

todos's People

Contributors

nathawat avatar

Watchers

James Cloos avatar Kittipong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.