Hi
so I'm just getting started with PHP and MySQL, and I can't seem to get some data from the database onto the webpage. I need to fill about 100 apdiv's, most at random, but i'm trying one item first to see how it works.
Here's the code I am trying for one single element:
<?php
include ("login.inc");
$cxn = mysqli_connect($host,$user,$password,$dbname)
or die ("Couldn't connect to server");
/ Select from table Sponsors the filelocation of Picture1 /
$query = "SELECT Picture1 FROM Sponsors
WHERE SponsorID='102'";
$result = mysqli_query($cxn,$query)
or die ("Couldn't execute select query.");
$row = mysqli_fetch_assoc($result);
extract($row);
/ Show picture on webpage in element apdiv26/
echo "<div id="apDiv26"><img src='../{$row['Picture1']}' width="100" height="100" alt="clickhere" />";
?>
</div>
I get the following: parse error, expecting "," or ";" on the line where the echo statement is.
Can anyone tell me what is wrong, because I have been looking for hours but l can't find it.
thanks