How To Add A Text Box With The Reference Count Retrieved In The Database Using Javascript?
I am trying to create a functionality that will retrieve all the rows with the same ID inside the database and wanted to display it inside a text box. this is the php file for gett
Solution 1:
For security reasons you should use filter_input instead of working with $_GET directly:
$ciCode =filter_input(INPUT_GET, "cID");
More information: https://www.php.net/manual/de/function.filter-input.php
In your isset might by a typo:
if (!isset($ciCODe)){
I think it should be
if (!isset($ciCode)){
In your Javascript use the append function to add the string to a div container, e.g.
for (var i=0; i <= cells.length ; i ++){
$('#someId').append('<divclass="form-group row">'
+ '<divclass="col-md-4 col-lg-2">'
+ '<labelfor="name-2"class="block">First name *</label>'
+ '</div>'
+ '<divclass="col-md-8 col-lg-10">'
+ '<inputid="name-2"name="name"type="text"class="form-control value =' + cells[i].home_number + ' required">'
+ '</div></div>');
}
Read here for more information to append: https://api.jquery.com/append/
In your html-code you need a div-container called with id="someId", where the string can be added, e.g:
<div id="someId">
</div>
Post a Comment for "How To Add A Text Box With The Reference Count Retrieved In The Database Using Javascript?"