HTML text input and using the input as a variable in a script(tcl)/sql(sqlite)

Posted by Fantastic Fourier on Stack Overflow See other posts from Stack Overflow or by Fantastic Fourier
Published on 2010-04-21T10:22:16Z Indexed on 2010/04/21 10:23 UTC
Read the original article Hit count: 571

Filed under:
|
|
|
|

Hello all, I'm very VERY new at this whole web thing. And I'm just very confused in general. Basically, what I want to do is take an input via text using HTML and adding that input to database, table trans. Should be simple but I am lost.

    <li>Transaction Number</li>
    <li><input type=|text| name=|tnumber| </li> // do i need to use value?
    <li>Employee Name</li>
    <li><input type=|text| name=|ename| </li>
    <li><input type=|SUBMIT| value=|Add|></li>


    ......
    ......
    sqlite3 db $::env(ROOT)/database.db
    mb eval {INSERT INTO trans VALUES ($tnumber, $ename}
    mb close

They are both in a same file and there are only two fields to the database to keep things simple. What I can see here is that tnumber and ename aren't declared as variables. So how do I do that so that the text input is assigned to respective variables?

© Stack Overflow or respective owner

Related posts about tcl

Related posts about text