Fetch Records and print on Page

Fetch Records and print on Page

I created a form that allows me to input data, which is saved in a Zoho relational database, then I created a report to view this data. All of this works perfect.

Then I tried to create a page, so the data can be exported in custom layout, but I have been unable to fetch (access) this data and print it out in my page. Can someone help me with the structure and syntax. I am familiar with PHP/SQL, so here is my code below:

<% firstname = BasicInformation_Information[ID !=0].First_Name;
lastname = BasicInformation_Information[ID != 0].Last_name; %>
<table width="200" border="1" cellpadding="1" cellspacing="1">
    <tbody>
        <tr>
            <td>First Name</td>
            <td>$firstname</td>
        </tr>
        <tr>
            <td>Last Name</td>
            <td>$lastname</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>

Currently I only have one record of data, but in the future I can put a loop in my table so fields are generated dynamically based on number of records in database. But, now I am unable to even output on record in this table. Please help.

Thank you,
Collin