0
$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!

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Meg_Spence
-1

I don't usually give out answers to homework as you're suppose to be learning this so here's a hint: tr = table row, td = table data (a cell), th = table header. If you need to make everything vertical, what is causing you to have 2 rows right now?

[Edit]
Think of a table like you're working inside of MS Excel and it should make sense as to what's going on.

Edited by Nyight: n/a

Votes + Comments
please don't assume just because the question is basic that I'm trying to cheat on homework. Not only is it rude but you look stupid when you're wrong.
0

Not homework but thank you I actually ended up rewriting the entire code to get it to do what I wanted. My school doesn't offer a PHP class that's why I needed help from here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.