Jump to content

[SOLVED] php + styles


supermerc

Recommended Posts

Can someone tell me when when I have a table with php in it, they dont follow the styles that I have.

[code] <?php
      require("config.php");
      require("func.php");
      //echo some styles to spice it up...
      echo "
      <style>
      body
      {
      background: #EBEBEB;
      font-family: Verdana, Arial;
      font-weight: bold;
      font-size: 9px;
      color: #000000;
      }
      .register_box
      {
      border: 1px solid #323232;
      background: #202020;
      font-family: Verdana, Arial;
      font-weight: bold;
      font-size: 9px;
      color: #FFFFFF;
      }
      </style>
      ";
      // if the variable member_id has been set, or there is a value assigned to it...
      if(isset($_GET['member_id']))
      {
      $member_id = (INT)$_GET['member_id'];
      $member_info = mysql_query("SELECT username, description, name, picture, email FROM users WHERE activated = '1' AND id = '$member_id' LIMIT 1");
      if(mysql_num_rows($member_info) > 0)
      {
      // we can go ahead and assign it to an array because this user exists
      $profile_info = mysql_fetch_assoc($member_info);
  ?>
  <table>
      <tr>
    <th colspan="2" scope="col"><?php echo'<h1>'.$profile_info[username].'</h1>' ?></th>
  </tr>
  <tr>
    <td width="290" rowspan="4"><img src="<?=$profile_info[picture]?>"></td>
    <td width="294"><?php echo'Name: '.$profile_info[name].''?></td>
  </tr>
  <tr>
    <td><?php echo'Email: '.$profile_info[email].''?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><?php echo''.$profile_info[description].''?></td>
    <td>&nbsp;</td>
  </tr>
  </table>
  <?php
      }
      else
      {
      echo "That member does not exist, or is not activated yet!";
      }
      }
      else
      {
      echo "There was no member ID to view a profile for!";
      }
      ?> [/code]
Link to comment
https://forums.phpfreaks.com/topic/31885-solved-php-styles/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.