<link href="../style.css" rel="stylesheet" type="text/css" />
<style type="text/css">

<div id="banner">
	<div class="headerStyle">
    <div style="padding:4px 0px;">&nbsp;Banner</div>
	$result = mysql_query("SELECT gambar FROM banner");
	while ($data = mysql_fetch_array($result)){
		echo "<img src="$data['gambar']">".'<br>';


Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in C:\xampp\htdocs\php_template2\includes\banner.php on line 20

Line 20: echo "<img src="$data">".'<br>';

Why is it?

change it with this:

echo '<img src="'.$data['gambar'].'"><br>';

bye :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.