?
Solved

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

Posted on 2014-10-27
3
Medium Priority
?
136 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 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 111

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…
Suggested Courses

764 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