Can data accessed by web form (built in PHP) from MySQL, be analysed i R and publish the results on webpage?

I have a situation where the data in my database is to be analysed and results are to be published on the web page, i built a web-form through which required data can be selected by the user, now this data should be send to R for some  analysis and results are needed to be published back on the  webpage,i have no idea how this can be done, i built the web app in PHP, with MySQL as database, any help will be appreciated,thanks in advance.
kay weiderAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
I assume you mean this R.

Generally speaking, the answer is "yes," and the implementation details are what you need to be concerned with.  Any time you need server-to-server communication or app-to-app communication, you use an API to effect the communication.  In the modern world, we would use the HTTP protocol to send requests and receive responses.  Your PHP application would gather the data and put it into some format that would be suitable for R.  Then acting as the HTTP client, the PHP app would make a request to R, and receive a response from R.  The response would become the basis for publishing the information on your web page.

How the HTTP client/server protocols works:

How a RESTful API works:

What looks like a good place to start understanding the R API(s):

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
stale question
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.