Solved

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

Posted on 2014-10-27
3
128 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
Comment Utility
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
Comment Utility
And
echo "<td>",$row[1];

should be

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

Notice its a period not a comma
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now