<?php
echo "<table>"<table cellpadding='4' cellspacing='3' border='1'>;
$query = mysql_query("SELECT orderID, entrytime, advertiser, contactname, contactemail, billingadress, billingcity, billingstate, billingzip, accountexecutive, aeemail, aextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, adelements, campaignreports, additionalinfo, assignedto, workpath, status, submittedby, rev, lastupdate, approved  FROM Mickeymouse");

while(list($orderID, $entrytime, $advertiser, $contactname, $contactemail, $billingadress, $billingcity, $billingstate, $billingzip, $accountexecutive, $aeemail, $aextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, $adelements, $campaignreports, $additionalinfo, $assignedto, $workpath, $status, $submittedby, $rev, $lastupdate, $approved  )) = mysql_fetch_row($query)){
echo "
<tr>
<td>$orderId/td>
<td>$entrytime</td>
<td>$advertiser</td>
<td>$contactname</td>
<td>$contactemail</td>
<td>$billingaddress</td>
<td>$billingcity</td>
<td>$billingstate</td>
<td>$billingzip</td>
<td>$accountnumber</td>
<td>$contactphone</td>
<td>$contactfax</td>
<td>$nrirep</td>
<td>$nriemail</td>
<td>$clientwebsite</td>
<td>$clickthroughurl</td>
<td>$adelements</td>
<td>$campaignreports</td>
<td>$additionalinfo</td>
<td>$assignedto</td>
<td>$workpath</td>
<td>$status</td>
<td>$submittedby</td>
<td>$rev</td>
<td>$lastupdate</td>
<td>$approved</td>
</tr>";
}
echo "</table>";
?>

What I want to do is pull info from the "mickeymouse" database and input it into an easy read table? Can anybody help me fix?

<?php
echo "<table>"<table cellpadding='4' cellspacing='3' border='1'>;
$query = mysql_query("SELECT orderID, entrytime, advertiser, contactname, contactemail, billingadress, billingcity, billingstate, billingzip, accountexecutive, aeemail, aextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, adelements, campaignreports, additionalinfo, assignedto, workpath, status, submittedby, rev, lastupdate, approved FROM Mickeymouse");

while(list($orderID, $entrytime, $advertiser, $contactname, $contactemail, $billingadress, $billingcity, $billingstate, $billingzip, $accountexecutive, $aeemail, $aextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, $adelements, $campaignreports, $additionalinfo, $assignedto, $workpath, $status, $submittedby, $rev, $lastupdate, $approved )) = mysql_fetch_row($query)){
echo "
<tr>
<td>$orderId/td>
<td>$entrytime</td>
<td>$advertiser</td>
<td>$contactname</td>
<td>$contactemail</td>
<td>$billingaddress</td>
<td>$billingcity</td>
<td>$billingstate</td>
<td>$billingzip</td>
<td>$accountnumber</td>
<td>$contactphone</td>
<td>$contactfax</td>
<td>$nrirep</td>
<td>$nriemail</td>
<td>$clientwebsite</td>
<td>$clickthroughurl</td>
<td>$adelements</td>
<td>$campaignreports</td>
<td>$additionalinfo</td>
<td>$assignedto</td>
<td>$workpath</td>
<td>$status</td>
<td>$submittedby</td>
<td>$rev</td>
<td>$lastupdate</td>
<td>$approved</td>
</tr>";
}
echo "</table>";
?>

Firstly, that should make it A LOT easier to read. Now let me take a look at it..

Member Avatar for nevvermind

I'm assuming that you want the exact same order as the fields in the database table.
Check if this code works for you:

<?php
$query = mysql_query("SELECT orderID, entrytime, advertiser, contactname, contactemail, billingadress, billingcity, billingstate, billingzip, accountexecutive, aeemail, aextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, adelements, campaignreports, additionalinfo, assignedto, workpath, status, submittedby, rev, lastupdate, approved FROM Mickeymouse");
?>

<table cellpadding="4" cellspacing="3" border="1">

    <?php
    while ($row = mysql_fetch_row($query)) {
        echo "<tr>";
        for ($i = 0; $i < count($row); $i++) {
            echo "  <td>$row[$i]</td>\n";
        }
        echo "</tr>";
    }
    ?>

</table>

Must I remind of the "SELECT * FROM Mickeymouse" syntax?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.