PHP script to call DB on Singel Text Box element |
Post Reply |
Author | |
djju1029
Senior Member Joined: Aug 02 2016 Location: the US Status: Offline Points: 126 |
Post Options
Thanks(0)
Posted: Aug 29 2016 at 3:33pm |
I made the PHP script to diaply DB value on single text box element.
In single text box //Single box source <div id="WEd7e0a2dcba" class="BaseDiv RWidth OEWETextBoxV2 OESK_WETextBox2_Default" style="z-index:1"> <div class="OESZ OESZ_DivContent OESZG_WEd7e0a2dcba"> <input name="name" type="text" class="OESZ OESZ_TextBox OESZG_WEd7e0a2dcba OEDynTag0" value="<?php include 'read.php'; ?>" /> </div> </div> //read.php $db = new SQLite3('../../Data/Local_previs_DB/illu.db'); echo($db->querySingle('SELECT name FROM test_table WHERE id=12')); When I use just one single text box, it can call succesfuly and display the singeDB value on text box. But if two or more text box in page, how I can read for each text box element using same read.php? |
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(1)
|
Hi.
1) Don't modify the page code manually like this. You can apply the value using jQuery. Add a Code Block (Source) type Javascript, you can insert the reading PHP code directly inside:
|
|
djju1029
Senior Member Joined: Aug 02 2016 Location: the US Status: Offline Points: 126 |
Post Options
Thanks(0)
|
Thank you so much, Dmit! It works!
Hmm.....I have to study jQuery too.....
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
jQuery basics are very simple, just modify examples to your needs and make sure your code is inside $(function(){ .... }); to make it work only when the page is ready.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |