I'm able to display mysql data from my database by simply echoing it in a blank div however I'd like to display it into an existing div style, by that I mean the style is already set.
I'm having trouble showing the right information in the write places and I could use abit of help with fixing up my code. Here is the code for the html div :
<div class="[ col-xs-12 col-sm-offset-2 col-sm-8 ]" style="margin-top: 10px">
<ul class="event-list">
<li>
<time datetime="2014-08-22">
<span class="day">22</span>
<span class="month">AUG</span>
<span class="year">2014</span>
<span class="time">ALL DAY</span>
</time>
<img alt="Steakout" src="http://www.thedramateacher.com/wp-content/uploads/2014/04/vcaa-2014.jpg" />
<div class="info">
<h2 class="title">Night before VCAA</h2>
<p class="desc">Staying.</p>
</div>
<div class="social">
<ul>
<li class="facebook" style="width:33%;"><a href="#facebook"><span class="fa fa-facebook"></span></a></li>
<li class="twitter" style="width:34%;"><a href="#twitter"><span class="fa fa-twitter"></span></a></li>
<li class="google-plus" style="width:33%;"><a href="#google-plus"><span class="fa fa-google-plus"></span></a></li>
</ul>
</div>
</li>
In php I've decided to just recreate the whole div and just add the data I'd like to show into the div, it worked when I was just displaying unested divs but now that theres more it's gotten confusing.
Here is my Php code:
include('Specials.html');
$Category = 'Specials';
$query = $pdo->prepare("SELECT * FROM adsubm WHERE CATEGORY LIKE '%$Category%'");
$query->execute();
while($row = $query->fetch()) {
echo "<div class ='[ col-xs-12 col-sm-offset-2 col-sm-8 ] style='margin-top: 10px'>
<ul class='event-list'>
<div class='info'>
<div class='info'>
<h2 class='title'>".$row['ADTITLE'],
<time datetime>.$row['DATE'],
<p class='desc'> $row['DESCRIPTION']."</div></ul></div></div></h2></p>";
}
?>
I've been doing it piece by piece and testing each time but this time there are errors just popping up everywhere. Kudos.