Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/07/2020 in all areas

  1. I thought I would present a modern solution based on Barand's that uses css grid. Same basic idea however, you need to replace the test output with your output loop. index.php <?php $output = ''; for ($i=1; $i<=28; $i++) { $output .= "<div class='entry'>Entry $i</div>\n"; } ?> <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/build/base-min.css"> <link rel="stylesheet" type="text/css" href="styles.css"> <title>Grid Layout</title> </head> <body> <h1>CSS Grid Table</h1> <div class="grid"> <?= $output ?> </div> </body> </html> styles.css body { margin: 1em; } .grid { display: grid; padding 1em; grid-template-columns: repeat(5, 1fr); grid-column-gap: 1em; grid-row-gap: 1em; /* Start at 100px height, stretch if content in a cell exceeds the 100px; */ grid-auto-rows: minmax(100px, auto); } .entry { background: #eee; padding: 1em; } Here's the rendered html and css moved to a codepen if you want to experiment.
    1 point
  2. Yes that is what I want This is the way i would like to do it how would i put in the select query into the code?
    1 point
  3. It's much easier with CSS and divs than it is with a table. <?php $output = ''; for ($i=1; $i<=28; $i++) { $output .= "<div class='db-entry'>Entry $i</div>\n"; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-language" content="en"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Example</title> </head> <style type="text/css"> .db-entry { width: 18%; height: 50px; padding: 20px 2px; border: 1px solid gray; margin: 0 2px 2px 0; float: left; } </style> <body> <?=$output?> </body> </html>
    1 point
  4. Because you should always work with yyyy-mm-dd format in your database (column type DATE) If you always want to insert the current date, use VALUES ('$oracleid','$name','$des',CURDATE(),'$username', '$pass','$isadmin') EDIT: and use prepared statements!
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • 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.