Hi All,

Here you need to understand two points

1)A Book Store App (which is a web application) made on PHP and MySQL is running on local wamp server(in one computer locally) for store's proprietary use, which is running fine.

2)I stucked with implementing online(Internet) version of web app for online reservations of books and customers collect books which are reserved online from Store by paying money in store.

Now if you understood the scenerion, my question is what is the best way to update Local MySQL Database, when some one reserved a book in online version of web application.

Note that one answer for this is integrating local version of webapp into online version, but it shud not be done.
Except above answer experts please guide me with
how to design a secure updation of local MySQL Database from online MySQL database or
how to send data from a PHP script to two databases securely

Which implementation is best and please do provide some pros and cons. Thanks in advance.

Member Avatar for LastMitch

@aabbys

Help me in correctly designing my Web App and Local Web App !!!!!!

I think you need to read more about creating a Web Apps.

My answer is to used Ajax!

I understood everything about web app and I had created lot of web apps with successful designing, but requirement here is I have to update two databasesz(one online and one local) when a customer reserved book.

The Local app is designed in such a way that we need to do lot of modifications for keeping it online. So, best action here is to update two databases at same time.

I want to confirm whether it will be a right design(updation of two databases, one local and one online) of local and web app or some body who have similar scenerio has better solution.

recomendation 1: on your local server run a cron to read the online database every minute, and get the reservation info
recomendation 2: have the online version send you an email, then read the mailbox infor and insert a record on the local DB.
recomendation 3: make the local server and online server, so your web app can read/write the local db. You dont need to host your web app on the local server, just make it visible

Thanks for recomendations.

Recomendation 2 is not applicable here as it is manual process.

In Recomendation-1
Can we able to access shared online MySQL database from local PHP page for running cron, I am not sure but I think its restricted.

In Recomendation-3
Is the local server is secure enough to keep online.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.