Jump to content

Introduce a register in a postgis db using javascript

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...