Reputation: 8585
Is it possible to do this?
I'm familiar with MySQL when it comes to webapps, but I'm learning how to create google chrome extension, and I'd like to somehow connect to my database from existing web app. I have created a form in the popup.html
from google's example, and would like to send input values to a script to insert data into MySQL when user submits this data. How would I do that?
Right I'm in developing stage and uploading chrome extension is easily done without uploading to my server. So I'm just wondering how I can connect MySQL database if its not localhost?
Thanks!
Upvotes: 2
Views: 6583
Reputation: 5174
I think what you don't want to give your chrome extension access to the database. That's a security nightmare of biblical proportions.
What you want to do is create a remote web-service that the extension can talk to, that then handles your database operations.
This can be as a PHP script that you call that returns a quick bit of JSON, or vastly more complex.
Upvotes: 4