Solved

PHP Parse error: syntax error, unexpected '<' in /var/apache/lindamatthews.net/test/open.php on line 21

Posted on 2014-10-27
3
131 Views
Last Modified: 2014-10-28
I'm getting this error

Parse error: syntax error, unexpected '<' in /var/apache/lindamatthews.net/test/open.php on line 21

But don't see the problem in the code here.pppppppp

<?php
ini_set("display_errors", "On");
error_reporting(E_ALL);

include("header.php");
include("menu.php");
$info=urldecode($_GET["info"]);
$info=explode("%f ", $info);
$c=$_GET["c"];
$r=$_GET["r"];

$row=explode("%i ",$info[$r]);
 
echo "<div class=\"content\">";

echo "<table><tr><td>";
echo "<img id=\"pic\" src=\"",$row[0],"\" style=height:425px><td style=\"width:3%;\">";
echo "<td>",$row[1];
echo "<tr><td>All images copyright Linda Matthews.";
echo "<td><button onclick=\"prevPicture()\"> Previous </button>";
          <button onclick=\"history.go(-1);\"> Thumbnails </button>";
          <button onclick=\"nextPicture()\"> Next </button>";
echo "</table></div>";

include("footer.php");


echo "<script type="text/javascript">"
echo "    function prevPicture() {"
echo "        document.getElementById(\"pic\").src=\"art/zen03.jpg\";";
echo "    }";

echo "   function nextPicture() {"
echo "        document.getElementById(\"pic\").src=\"art/zen04.jpg\";";
echo "    }";
echo "</script>";

Open in new window

0
Comment
Question by:padmasambhava
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40407673
What is line 21?

echo "<img id=\"pic\" src=\"",$row[0],"\" style=height:425px><td style=\"width:3%;\">";

Should be

echo "<img id=\"pic\" src=\"".$row[0]."\" style=height:425px><td style=\"width:3%;\">";
0
 
LVL 58

Expert Comment

by:Gary
ID: 40407674
And
echo "<td>",$row[1];

should be

echo "<td>".$row[1];

Notice its a period not a comma
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 40408325
Just a note... Anytime you see Parse error: syntax error, unexpected... it means something upstream from the noted line number contains the error.  In some cases "upstream" might mean earlier in the same line, but other times it may mean mismatched quotes, curly braces or parentheses several lines above.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question