Hello ,
I have a problem with an exercise from college and can’t figure out where my mistake is because I am sure
it’s in the syntax.
In the example given to us, I was able to get the pictures displayed.
for ($i=0;$i<$num_results;$i++)
{
$row=mysql_fetch_array($result);
extract($row);
echo "<p>Car id:",$carid;
echo "<br>";
echo "<img src='photos/".$photo.".png'>";
echo "<br>";
echo "<p>";
}
However in the task where we have to transform the page from a carorder form into a boatorder form. The boat order form is not displaying my images.
for ($i=0;$i<$num_results;$i++)
{
$row=mysql_fetch_array($result);
extract($row);
echo "<p>Stock No:",$stockno;
echo "<br>";
echo "Make: ",$make;
echo "<br>";
echo "<img src='./resources/images/",$photo.".png'>";
echo "<br>";
echo "<p>";
}
Maybe some context:
In the Mock-exercise, we were given the code and the scenario, that a dealership wants to have a login page and order form page and we had to get it working ( i managed that, except something minor).
Anyway for the exercise alone we have to transform the login and orderpage etc. from a car dealer to a boat manufacturer, so the pictures are in a different folder and I cannot figure out why it won’t display my pictures.
The tree in the folders are index.html is on same level as resource folder and images is a child of resources.
Hope somebody can help.
Kind regards
Lukas