Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:32:24+00:00 2026-06-10T21:32:24+00:00

I have a web applications that stores data in a MySQL database on-line. It

  • 0

I have a web applications that stores data in a MySQL database on-line. It also retrieves data using PHP code, performs calculations on the server and sends the result back to the user.

Data it’s quite simple: names, descriptions, prices, VAT, hourly charges that are read from the database and manipulated on the server side.

Often client work in environments where the internet connection is poor or not available. In this case I would like the client to be able to work offline: enter new names, descriptions, prices and use the last VAT to perform calculations. Then synchronise all data as soon as a connection is available.

Now the problem is that I do not know what is the best way or technologies for achieving this. Don’t worry, I am not asking to write code for me. Can you just explain to me what is the correct way to build such a system?

Is there a simple way to use my online MySQL and PHP code locally?

Should I save the data I need in a local file, rebuild the calculation in JavaScript, perform them locally and then synchronise the data if database is available.

Should I use two MySQL database, one local and one online and do a synchronisation between the two when data is available? If yes which technology (language) shall I use to perform this operation?

If possible, I would like an answer from PHP coders that worked on a similar project in the past and can give me detailed information on framework structure and technology to use. please remember that I am new to this way of writing application and I would appreciate if you can spare few minutes and explain everything to me like if I am six year old or stupid (which I am!)

I really appreciate any help and suggestion.

Ciao,

Donato

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:32:26+00:00Added an answer on June 10, 2026 at 9:32 pm

    There are essentially 3 ways to go:

    Version 1: “Old school”: PHP-Gtk+ and bcompiler

    • first, if you not have done so already, you need to separate your business logic from your presentation layer (HTML, templating engines, …) and database layer
    • then adapt your database layer, so that it can live with an alternative DB (local SQlite comes to mind) and perform synchronisation when online again
    • Finally use PHP-Gtk+ to create a new UI and pack all this with bcompiler

    Version 2: “Standard”: Take your server with you

    • Look at Server2Go, WampOnCD and friends to create a “double clickable webserver” (Start at Z-WAMP)
    • You still need to adapt your DB layer as in Version 1

    Version 3: “Web 2.x”: Move application from server to browser

    • Move your application logic from the server side (PHP) to the client side (JS)
    • Make your server part (PHP) only a data access or sync layer
    • Use the HTML5 offline features to replace your data access with local data if you are offline and to resync if online

    Which one is best?

    This depends on what you have and what you want. If most of your business logic is in PHP, then moving it into the browser might be prohibitingly expensive – be aware, that this also generates a whole new class of security nightmaares. I personally do not recommend porting this way, but I do recommend it for new apps, if the backing DB is not too big.

    If you chose to keep your PHP business logic, then the desicion between 1 and 2 is often a quiestion of how much UI does your app have – if it’s only a few CRUD forms, 1. might be a good idea – it is definitly the most portable (in the sense of taking it with you). If not, go with 2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a web application driven by a mysql database that stores information
I have several web applications that make use of packages using WebActivator. On my
I have a simple page in a PHP/MySQL web application that lets admin users
Currently in my ASP.Net applications web.config I have an application setting that stores a
I have a database that many different client applications (a smattering of web services,
I'm using PHP to develop web applications. I've used MySQL as my RDMS. For
I have a php web application that uses big cookies to store a lot
I have two web applications that are running on a single Tomcat server and
I have several web applications in production that utilize NFS mounts to share resources
I have a library project that should be the base for several web applications.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.