Jump to content

[SOLVED] quick parse error thread


Lodius2000

Recommended Posts

i am getting a parse error , unexpected ')' on line 31

 

just look for the comment

<?php





session_start();
require ('../../../install/PEAR/DB.php');
require ('../../../../dbfiles/db_login.php');
require ('../formhelpers/formhelpers.php');
$db->setErrorHandling(PEAR_ERROR_DIE);
$db->setFetchMode(DB_FETCHMODE_ASSOC);

if ($_SESSION['username']){

$list = $db->getAll('SELECT article_id, timestamp, article_title FROM text_cms');

print "<html>\n";
print "<head>\n";
print "</head>\n";
print "<body>\n";
print "<p>Logged in as <strong>$_SESSION[username]</strong></p>\n";
print "<br />\n";
print "<br />\n";
print "<table>\n";
print "<th>\n";
print "<td><strong>Article ID</strong></td>\n";
print "<td><strong>Article Title</strong></td>\n";
print "<td><strong>Timestamp</strong></td>\n";
print "</th>\n";
//the following line is line 31
foreach ($list = $row) {
print "<tr><td>$row[0]</td><td>$row[2]</td><td>$row[1]</td></tr>\n";
}

print "</table>\n";
print 'There are ' . $list->numrows() . ' articles in the database.';
print "</body>\n";
print "</html>\n";

} else {
print '<a href="../index.php">Log In dummy</a>';
}


?>

 

wheres the error?

Link to comment
https://forums.phpfreaks.com/topic/107737-solved-quick-parse-error-thread/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.