Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:17:51+00:00 2026-06-15T15:17:51+00:00

I keep getting a Parse error: syntax error, unexpected T_STRING and im not sure

  • 0

I keep getting a Parse error: syntax error, unexpected T_STRING and im not sure why i keep getting it, it is for a search query on line 157,

This is the full lot of code, it kept firing up with different errors after I tried what you suggested.

echo ' <a href="details.php?ID=' . $row['AttractionID'] . '"><img  src="'. $row['ImageUrl'] . '" id="img_rest" /></a><br/>';

Cheers in advance

<?php

    $button = $_GET ['submit'];
    $search = $_GET ['search']; 

    if(!$button)
    echo "you didn't submit a keyword";
    else
    {
    if(strlen($search)<=1)
    echo "Search term too short";
    else{
    echo "You searched for \"<strong>$search</strong>\" <hr />";
    mysql_connect("localhost","wd","wd");
    mysql_select_db("leedsattractions");

    $search_exploded = explode (" ", $search);

    foreach($search_exploded as $search_each)
    {
    $x++;
    if($x==1)
    $construct .="name LIKE '%$search_each%'";
    else
    $construct .="AND name LIKE '%$search_each%'";

    }

    $construct  = "SELECT * FROM Attraction WHERE $construct" ;

    $run = mysql_query($construct);

    $foundnum = mysql_num_rows($run);

    if ($foundnum==0)
    echo "No results found for \"<strong>$keywords</strong>\" <hr />";
    else
    {
    echo "\"<strong>$foundnum</strong>\" results found !";

    while($row = mysql_fetch_assoc($run))
    {

        echo ' <a href="details.php?ID=' . $row['AttractionID'] . '"><img src="'. $row['ImageUrl'] . '" id="img_rest" /></a>';
        echo ' <div class="img_rst">';
        echo ' <h2><a href="details.php?ID=' . $row['AttractionID'] . '">' . $row['Name'] . '</a></h2>'; 
        echo ' <p>' . $row['TypeName'] . '</p>';
        echo ' <p>' . $row['Summary'] . '</p>';
        echo ' <h2>' . $row['Postcode'] . '</h2>';
        echo ' </div>'; 
            echo ' <hr />';


    }
    }

    }
    }


    ?>
            
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:17:53+00:00Added an answer on June 15, 2026 at 3:17 pm
        echo " <a href='details.php?ID='" . $row['AttractionID'] . "'><img  src='". $row['ImageUrl'] . "' id='".$img_rest."' /></a><br/>";
    
    you can repeat the id of image 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting a Parse error: syntax error, unexpected T_STRING in /newref-exec.php on line
I keep getting the error Parse error: syntax error, unexpected T_STRING on line #9
I keep getting this T_STRING Parse error im not sure what it is but
I keep getting the following error: Parse error: syntax error, unexpected T_SL in /home/a4999406/public_html/willingLog.html
I keep getting a syntax error Parse error: syntax error, unexpected '{' in contact_form.php
Not sure what my problem is. On line 4 I keep getting an error.
I keep getting a Parse error: syntax error, unexpected ':', expecting ')' in /home/jobkill/public_html/process.php
I keep geting this error: Parse error: syntax error, unexpected '}' in /Users/skline/Sites/tiptap/Site/tiptap/survey_current.php on
I'm making a login script and I keep getting this error Parse error: syntax
here's the error I keep getting: Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.