So I created this script to test out if I could output from my database. And it works fine inside the php, but when I trying extracting that data inside a div tag in HTML, it does not work. Any suggestions, thanks.
//Connection to database, working fine, top of page
<?php
require "include/mysql.php";
if (!$con) {
die('Could not connect: ' . mysql_error());
}
?>
//This is also working as intended
<?php
$sql = "SELECT * FROM `LISTINGS` ORDER BY `LISTINGS`.`YA` DESC";
$myData = mysql_query($sql,$con);
while($record = mysql_fetch_array($myData)){
echo $record['TITLE'];
}
?>
//Here is were the problem, in the H2 tag, i'm trying to output a title but it is not working.
<div class="cards-row">
<div class="card-row">
<div class="card-row-inner">
<div class="card-row-image" data-background-image="assets/img/tmp/product-1.jpg">
</div><!-- /.card-row-image -->
<div class="card-row-body">
<h2 class="card-row-title"><?php echo $record['TITLE'];?>title</h2>
<div class="card-row-content">Description</div><!-- /.card-row-content -->
</div><!-- /.card-row-body -->
<div class="card-row-properties">
<dl>
<dd>Test</dd><dt>Visit Website</dt>
<dd>Test</dd><dt>More Info</dt>
<dd>Added</dd><dt>AddedDate</dt>
<dd>Visited</dd><dt>Visited</dt>
</dl>
</div><!-- /.card-row-properties -->
</div><!-- /.card-row-inner -->
</div><!-- /.card-row -->
</div><!-- /.cards-row -->
I know there is a lot of unfinished code but im just testing a few things out at the moment, sorry for bad grammar.