I have a database on PHPMyAdmin, named mydb, then a table named myguests. Its supposed to access the information on the database and display it. Here is my code:
<?php
$connection = mysql_connect('localhost', 'root', '');
mysql_select_db('mydb');
$query = "SELECT * FROM myguests";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "Name: " . $row["firstname"]. " " . $row["lastname"].;
}
mysql_close();
?>
When I go to display the webpage it says
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\printback.php on line 10
Anyone have a solution?
Thanks for helping me!