I would like to display data from a MySQL DB on a PHP page after it has been rendered. I know I could use JavaScript's innerHTML but I don't know the most intelligent method of getting a dataset to the page from the MySQL DB.
Is there a "best" way to get a dataset to the page and then have JavaScript parse through it showing one item at a time? I can parse through the set but don't know what I should use to hold the set.
There will be data coming from the MySQL DB for each div meaning all five. Do I use 5 arrays or is there a more correct way of doing this?
Thanks
Is there a "best" way to get a dataset to the page and then have JavaScript parse through it showing one item at a time? I can parse through the set but don't know what I should use to hold the set.
There will be data coming from the MySQL DB for each div meaning all five. Do I use 5 arrays or is there a more correct way of doing this?
Thanks
Code:
<form class="my_frm" name="sm_main"> <div class="my_scr">Which Library</div> <div class="my_bk">Which Book </div> <div class="my_ref">Which page and line</div> <div class="my_prompt">Author and Date</div> <div class="my_vrs">Place information here</div> </form>
Comment