Jump to content

Introduce a register in a postgis db using javascript


elcaiaimar
 Share

Recommended Posts

Hello everybody!

 

I'm working in a cartographic viewer which has several buttons with JS code. I would like to know how could I introduce a register in a postgis db using JS code too. I mean, I want to click in a button, fill all the fields (columns of the table) and then click on accept to save the register.

 

Is it possible to do? Could anybody help me please?

 

Thank you a lot!

Link to comment
Share on other sites

You can't interact with a database like PostgreSQL directly with Javascript, you need to use a server-side language like PHP to run the SQL queries. You can use Javascript to send data to PHP and then have PHP interact with the database and return data back to Javascript if necessary.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...