Hello everyone 🙂 . I am a beginner, and Im just trying to retrieve some data from a MySQL database. I keep getting the same error, and don't really know where the error is.
Here is the error I keep getting:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/34/d155877179/htdocs/lunchmenuframe.php on line 22
Any help would be greatly appreciated, thanks in advance!
<?php
@ $db = new mysqli('db341.perfora.net ', 'dbo160310543', 'Bc7c9qVc' 'db160359374');
if(mysqli_connect)errno())
{
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
$query = "select * from lunchmenu";
$result = $db->query($query);
$num_results = $result->num_rows;
for ($i=0; $i <$num_results; $i++)
{
$row = $result->fetch_assoc();
echo '<p><strong>'($row['item'])'</strong>';
echo '<br /><center>'($row['description']);
echo '<br /><center>'($row['price']);
echo '</p>';
}
$result->free();
$db->close();
?>