Jump to content

More Help needed.


RSprinkel

Recommended Posts

Sorry for being such a noob at this.  But here is my issue.

I have a page that displays data coming out of a table that places the data in row format.  I would like to have it displayed in column format.  I don't want the data to be editable though.

Here is the code that spits it out in Row format:
[code]<table border="0" cellpadding="5" cellspacing="0" align="center" style="font-size: 9pt; border: solid 1px">

    <tr bgcolor="#b5d0e5">
<th align="center">Sierra Name</th>
<th align="center">Location</th>
<th align="center">Date Joined</th>
<th align="center">Status</th>
    <th align="center">Open</th>
<th align="center">Member Bio</th>
    </tr>
<?
$sql = "SELECT * FROM users WHERE username = '$username'";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
?>
    <tr style="color: #111111">
<td align="center"> <?echo $row["sierra"];?> </td>
<td align="center"><?echo $row["location"];?></td>
<td align="center"><?echo $row["signup_date"];?></td>
<td align="center"><?echo $row["status"];?></td>
    <td align="center"><?echo $row[""];?></td>
<td align="center"><?echo $row["bio"];?></td>
    </tr>[/code]

That spits the data out like this:

Sierra          Location          Signup Date          Status        Open          Bio
Data            Data                Data                  Data          Data          Data

[b]I like to have it displayed as this:[/b]

Sierra: data
Location:  data
Signup Date: data
Status:  data
Open: Data
Bio: data (but the data needs to be in a scrollable text box)

I have tried this and modified it many times and still nothing appears:

[code]<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="17%" id="AutoNumber1">
    <tr>
      <td width="99%" align="center">Sierra Name</td>
      <td width="3%"><?echo $row["sierra"];?></td>
    </tr>
    <tr>
      <td width="99%" align="center">Location</td>
      <td width="3%"><?echo $row["location"];?></td>
    </tr>
    <tr>
      <td width="99%" align="center">Date Joined</td>
      <td width="3%"><?echo $row["signup_date"];?></td>
    </tr>
    <tr>
      <td width="99%" align="center">Status</td>
      <td width="3%"><?echo $row["status"];?></td>
    </tr>
    <tr>
      <td width="99%" align="center">&nbsp;</td>
      <td width="3%">&nbsp;</td>
    </tr>
    <tr>
      <td width="99%" align="center">Member's Bio</td>
      <td width="3%"><?echo $row["bio"];?></td>
    </tr>
  </table>[/code]

[color=blue][b]Thanks very much in advance[/b][/color] :(
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.