php - Fetch value from database into dynamically added row -
I'm new to and here So please tell me, how can I add the data name and the dynamically added row to the unit price? Thanks in advance. I assume that you have the SQL database, what is this taste of SQL ? In a way you can do that using an Ajax call to capture database information, and then use it in your dynamically created table. Your Ajax might look like this: PHP programming, now I'm making a program for billing system. The table is created and by adding the row dynamically to the table, it works fine. Now I want to add value to the database in the dynamically added row, please tell me how to add value. Here is my code form
& lt; form style = "margin-left: 200px; padding: 10px; background: yellow; width: 500px;" Action = "bill.fp" method = "post" name = "transaction" id = "transaction" & gt; & Lt; Span style = "color: black" & gt; Receipt Number: & lt; / Span & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Input type = "text" name = "no RCPT" id = "no RCPT" /> gt; & Lt; / Br & gt; & Lt; / Br & gt; & Lt; Label = "student name" & gt; & Lt; Span style = "color: black" & gt; Customer's Name: & lt; / Span & gt; & Lt; / Label & gt; & Lt; Select name = "st_name" id = "st_name" & gt; & Lt; Option value = "" & gt; Select ..
JQUERY
var cnt = 2; ($ ('($' '(' # AddItem ') Click' & lt; tr & gt; & lt; td & gt; '+ cnt +' & lt; / td & gt; Item tr '). Td>' + cnt + '& lt; / td> & lt; td & gt; & lt; input type = "text" name = "txtbx' + cnt + '" value = "'+ Cnt +'" "gt; & lt; / td> & lt; / tr & gt; '); cnt ++;});
$ Ajax ({url: "http: // locationofyourdbhook",}) .done (function) {if (console & amp; console ('& lt; tr & gt; & lt; td & gt;' + data After cnt + ' & lt; TD & gt;' + data.cnt + '($ "' ('# item tr'). & Lt; / td & gt; & lt; Td> Input & lt; / Tr>); cnt ++;}});
Comments
Post a Comment