Code Monkey home page Code Monkey logo

php-database-html-ajax-assignment's Introduction

Test assignment

A small web application that touches on database, PHP, HTML/CSS and JavaScript/jQuery/AJAX.

This app should access a MySQL database table called ‘user’ that has the following columns:

  • user_id
  • name
  • access_count
  • modify_dt

That table should have several rows in it, each with distinct data.

The database should be accessed using an instance of a PHP class that manages the connection and provides methods for accessing the user table.

A PHP class that generates a page containing a tabular form should be written that includes all of the columns from the user table; it should list all of the rows.

Each row should have a button that, when clicked, uses AJAX to bump the access_count and update the modify_dt of the selected user using the server’s time.

The form should be updated to reflect the current access_count and modify_dt without reloading the page itself.

A page-level PHP script should be written that brings all of these elements together.

  • CSS should be used for styling;
  • Inline styles should be avoided.
  • This code should not be based on an existing PHP or JS framework (other than jQuery).
  • The code should be structured in a way that would easily accommodate either additional functionality to this page or additional pages without adding undue complexity to the current implementation.

Start local environment:

Local environment uses docker-compose.

To start project, execute these commands:

docker-compose up -d
docker-compose exec app composer install

You are done. Goto http://localhost:9080

php-database-html-ajax-assignment's People

Watchers

Ivan Paskhin 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.