views:

51

answers:

2

Hi,

How to insert fields values from HTML page to SQLite database ? How to connect from HTML to SQLite ?

Thanks.

A: 

HTML is not a programing language its a markup language. use a programing language like php to do this.

antpaw
Thanks antpaw for your reply.
Prog_Sud
+1  A: 

You need to separate your problem into two pieces:

  1. How to extract values from an HTML page?
  2. How to INSERT values into a SQL database?

You can't make a database connection using HTML. Best to choose an intermediate language like Python, Java, C#, PHP, etc. You shouldn't want to, either, because you'll want your database to be secured in some way. You don't want unauthorized access or SQL injection attacks.

You get values out of an HTML page by sending an HTTP POST request to a listener of some kind (e.g., a Java servlet). The servlet gets the parameter, value pairs out of the request for you. You can validate them, bind them to objects, or anything else that you need to do.

Once you have the parameter, value pairs you can make a connection via something like ODBC or JDBC (if you choose Java) and INSERT them into tables using standard SQL.

duffymo
Thanks duffymo for your detailed explanation.
Prog_Sud