Jump to content

westmatrix99

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Posts posted by westmatrix99

  1. Oh you want to create the HTML for that page from the database. How is the $row_rsabout['about'] created what data does it hold. It might be helpful if you could post more code.

     

    The record "about" just holds demo data.

    mysql_select_db($database_cnaida, $cnaida);
    $query_rsabout = "SELECT * FROM tblabout";
    $rsabout = mysql_query($query_rsabout, $cnaida) or die(mysql_error());
    $row_rsabout = mysql_fetch_assoc($rsabout);
    $totalRows_rsabout = mysql_num_rows($rsabout);

  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>TEST BREAK UP</title>
    </head>
    <body>
    <p>TABLE1</p>
    <table width="300" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td><?php echo nl2br($row_rsabout['AboutUs']); ?></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table>
    <p>TABLE2</p>
    <table width="300" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td><?php echo nl2br($row_rsabout['AboutUs']); ?></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table>
    <p>TABLE3</p>
    <table width="300" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td><?php echo nl2br($row_rsabout['AboutUs']); ?></td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table>
    <p>THE END</p>
    </body>
    </html>

  3. Ok each table is broken up already using the normal or standard HMTL table option

    The data is in each table but not from the database.

    I would need the data from the database table to be broken up into the different tables.

    The home page is fine, it's the others that I will have this problem with.

     

    Table1

    Data from the same record

    Table2

    rest of the data from the same record

    My option that will work but is irritating:
    The other option is to have the administration panel have the different textboxes for each table of data.
    That way the records would be seperated easier

  4. I use this on one of my sites to check if the user is activated within 3 days (72Hours) if not they get deleted. ;D

     

    <?php 
    $sql = "SELECT * FROM tbltime";
    $result = mysql_query($sql);
    while($row_rstime = mysql_fetch_array($result)){
    $activated = $row_rstime['active'];
    $when = strtotime($row_rstime['date_joined']); // "2007-05-24 20:50:53"
    if ($activated == 'Y' || time() < ($when+60*60*24*3)) {  
    echo 'Whatever'<br>';
    }else{
    //Get the date and hour, 72 hours ago
    $minus = strtotime("-72 hours");
    $date = date("Y-m-d H:i:s", $minus);
    $query = "Do something here if needed";
    $delete = mysql_query($query);
    echo 'Whatever'<br>';
    }
    }
    ?>

     

    Hope this will help you get an idea?

    Otherwise search php.net for date and time functions.

     

    Cheers

    West

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