Alright so I've been working on a CMS [Content Management System] for a Conquer Online Private Server. So far, this is what I have:
1. This is the actual site and how it's supposed to look.
2.
PHP Code:
<?php
$con=mysqli_connect("xx.xxx.xx.xxx","user","pass","co");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM articles");
?>
<div class="main main_title">
<?php while($row = mysqli_fetch_array($result))
{
echo $row['title'];
echo "<br>";
}
?>
</div><div class="main main_content">
<?php
$result = mysqli_query($con,"SELECT * FROM articles");
while($row = mysqli_fetch_array($result))
{
echo $row['content'];
echo "<br>";
}
?>
<div align="right"><?php
$result = mysqli_query($con,"SELECT * FROM articles");
while($row = mysqli_fetch_array($result))
{
echo $row['author'];
}
mysqli_close($con);
?>
</div>
</div>
<div class="main main_bottom">
</div>
3. This is the database table [articles]. Each id is different.
This is the point where I am stuck...What I need it to do, for every different id in the 'articles' database it needs to have a new box. A new box meaning the css coding around it so that it looks good. Kind of like this:
PHP Code:
<div class="main main_title"> TITLE PHP CODE </div>
<div class="main main_content">CONTENT PHP CODE</div>
<div class="main main_bottom">BOTTOM BORDER CSS</div>
So for the title it needs to have the "main main_title" div tags around it.
The contect needs "main main_content" div tags around it.
The bottom border can just be put in at the end.
Not sure if this is the right spot for this, it is an idea that I am planning on releasing for the private server community, just need a little help (;
Any help is appreciated and please, if you're not going to help, please don't comment! xD