I'm really new to PHP and have been stuck on this problem for awhile. I've been trying to insert a header, multiple images in a list, and footer from a database with this code:
-------------------------------------------------
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<head> <title> Reimagined Movie Posters </title> </head>
<body>
<?php include_once "header.php"; ?>
<?php
include_once "db_connect.php";
die($mysqli->stat());
$result = $mysqli->query("SELECT * FROM store WHERE id=".$_GET['name']); /
if($mysqli->errno) die($mysqli->error);
while($row = $result->fetch_object()){
$images = explode(",", $row->images);
?>
<?php
}
?>
<?php include_once "footer.php"; ?>
</body>
</html>
-------------------------------------------------
and I keep on getting the error:
"hello You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
What am I doing wrong? All I have on line 1 is <!doctype html>.