I got this problem, which I just can't get to work.
<?php
$sql="SELECT * FROM `news_vertical`";
$sql2=mysql_query($sql) or die("Couldn't etablish connection with the server or username wasn't found in the database.");
$count=mysql_num_rows($sql2);
if($count>0)
{
while($row = $sql2->fetch_assoc()) {
if($row["Pull-LR"] == 'Right')
{
echo '<hr class="featurette-divider"><div class="row featurette"><div class="col-md-7"><h2 class="featurette-heading">', $row["title"], '</h2><span class="text-muted">- Skrevet af: ', $row["userstamp"], '</span><p class="lead">', $row["text"], '</p></div><div class="col-md-5"><img class="featurette-image img-responsive" data-src="holder.js/500x500/auto" alt="500x500" src="', $row["picture_url"], '" data-holder-rendered="true"></div></div><div class="row featurette"><div class="col-md-2 pull-left"><p>Skrevet den: ', $row["timestamp"], '</p></div></div>';
}
else if($row["Pull-LR"] == 'Left')
{
echo '<hr class="featurette-divider"><div class="row featurette"><div class="col-md-5"><img class="featurette-image img-responsive" data-src="holder.js/500x500/auto" alt="500x500" src="', $row["picture_url"], '" data-holder-rendered="true"></div><div class="col-md-7"><h2 class="featurette-heading">', $row["title"], '</h2><span class="text-muted">- Skrevet af: ', $row["userstamp"], '</span><p class="lead">', $row["text"], '</p></div></div><div class="row featurette"><div class="col-md-2 pull-right"><p>Skrevet den: ', $row["timestamp"], '</p></div></div>';
}
}
}
else
{
die("Could't find 'news_vertical' database.");
}
?>
I'm sure the tables are correct, it's just, I can't get it to list the information.