php - I'm getting a syntax error...Any help, i would greatly appreciate it -


<?php require_once 'cn.php'; include_once("../php_includes/check_login_status.php");  $fiveminutesago = time() - 600;  $sql = 'select     username, message_content, message_time             messages             message_time > ' . $fiveminutesago . '         order     message_time'; $query = mysqli_query($db_connections, $sql) or die(mysql_error($db_connections));   while ($row = mysql_fetch_assoc($result)) {               $hoursandminutes = date('g:ia', $row['message_time']);{    echo '<p><strong>' . $row['username'] . '</strong>: <em>(' . $hoursandminutes . ')</em> ' . $row['message_content'] . '</p>'; } ?> 

replace

$hoursandminutes = date('g:ia', $row['message_time']);{ 

with

$hoursandminutes = date('g:ia', $row['message_time']); 


have opening brace in middle of nowhere.

also replace

while ($row = mysql_fetch_assoc($result)) { 

with

while ($row = mysqli_fetch_assoc($query)) { 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -