$OrderId = (int) $_REQUEST["OrderId"];
// query one of two
$sql = 'select * from mickey.mouse where OrderId='.$OrderId ;
$result = mysql_query($sql) or die('Query failed'.mysql_error());
$orderID_Passed =1;
echo "test2<br/>";
$numfields = mysql_num_fields($result);
echo $numfields ;
echo "<br/>";
echo "<table><table cellpadding='4' cellspacing='3' border='1'>";
$orderID_Passed = 1 ; //replace with the request object value.
$sql = "SELECT orderID, entrytime, advertiser, contactname, contactemail, billingaddress, billingcity, billingstate, billingzip, accountexecutive, aeemail, aeextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, adelements, campaignreports, additionalinfo, assignedto, workpath, status, submittedby, rev, lastupdate, approved FROM nritask2.insertionorder WHERE = $orderID_Passed";
$sql = 'SELECT * FROM mickey.mouse WHERE orderID = '.$orderID_Passed;
echo 'ok 1 $sql='.$sql;
//$query = mysql_query($sql );
$result = mysql_query($sql) or die('Query failed'.mysql_error());
//while($row = mysql_fetch_array($result))
echo '<font color="#0000FF" >';
echo "<tr>
<th>orderId</th>
<th>entrytime</th>
<th>advertiser</th>
<th>contactname</th>
<th>contactemail</th>
<th>billingaddress</th>
<th>billingcity</th>
<th>billingstate</th>
<th>billingzip</th>
<th>accountnumber</th>
<th>contactphone</th>
<th>contactfax</th>
<th>nrirep</th>
<th>accountexecutive</th>
<th>aeemail</th>
<th>aeextphone</th>
<th>nriemail</th>
<th>clientwebsite</th>
<th>clickthroughurl</th>
<th>adelements</th>
<th>campaignreports</th>
<th>additionalinfo</th>
<th>assignedto</th>
<th>workpath</th>
<th>status</th>
<th>submittedby</th>
<th>rev</th>
<th>lastupdate</th>
<th>approved</th>
</tr>";
echo '</font>';
while($row = mysql_fetch_assoc($result) )
{
/*while( list($orderID, $entrytime, $advertiser, $contactname, $contactemail, $billingaddress, $billingcity, $billingstate, $billingzip, $accountexecutive, $aeemail, $aeextphone, accountnumber, contactphone, contactfax, nrirep, nriemail, clientwebsite, clickthroughurl, $adelements, $campaignreports, $additionalinfo, $assignedto, $workpath, $status, $submittedby, $rev, $lastupdate, $approved )) = mysql_fetch_row($query)) {
*/
echo "<tr>
<td>".$row["orderId"]."</td>
<td>".$row["entrytime"]."</td>
<td>".$row["advertiser"]."</td>
<td>".$row["contactname"]."</td>
<td>".$row["contactemail"]."</td>
<td>".$row["billingaddress"]."</td>
<td>".$row["billingcity"]."</td>
<td>".$row["billingstate"]."</td>
<td>".$row["billingzip"]."</td>
<td>".$row["accountnumber"]."</td>
<td>".$row["contactphone"]."</td>
<td>".$row["contactfax"]."</td>
<td>".$row["nrirep"]."</td>
<td>".$row["accountexecutive"]."</td>
<td>".$row["aeemail"]."</td>
<td>".$row["aeextphone"]."</td>
<td>".$row["nriemail"]."</td>
<td>".$row["clientwebsite"]."</td>
<td>".$row["clickthroughurl"]."</td>
<td>".$row["adelements"]."</td>
<td>".$row["campaignreports"]."</td>
<td>".$row["additionalinfo"]."</td>
<td>".$row["assignedto"]."</td>
<td>".$row["workpath"]."</td>
<td>".$row["status"]."</td>
<td>".$row["submittedby"]."</td>
<td>".$row["rev"]."</td>
<td>".$row["lastupdate"]."</td>
<td>".$row["approved"]."</td>
</tr>";
}
echo "</table>";
I really need to make this into a vertical table with the headers still attached but I'm not sure how? Can anyone please help it's due soon!