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

  • SEARCH
  • Home
  • 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 8200357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:25:16+00:00 2026-06-07T06:25:16+00:00

<?php require ‘db.php’; include_once(header.php); include_once(functions.php); if(isset($_POST[‘search_term’])){ $search_term = mysql_real_escape_string(htmlentities ($_POST[‘search_term’])); if(!empty($search_term)){ $search = mysql_query(SELECT

  • 0
<?php
require 'db.php';
include_once("header.php");
include_once("functions.php");


if(isset($_POST['search_term'])){
    $search_term = mysql_real_escape_string(htmlentities ($_POST['search_term']));

    if(!empty($search_term)){

        $search = mysql_query("SELECT users.username, users.id, tbl_image.photo, tbl_image.userid FROM users LEFT OUTER JOIN tbl_image ON users.id=tbl_image.userid WHERE users.username LIKE '%$search_term%' and users.business <> 'business'");


        $result_count = mysql_num_rows($search);



        $suffix = ($result_count != 1) ? 's' : '';


        echo '<div data-theme="a">Your search for <strong>' , $search_term ,'</strong> returned <strong>', $result_count,' </strong> record', $suffix, '</div>';



        while($results_row = mysql_fetch_assoc($search)){
            echo '<div data-theme="a"><strong>',$results_row['photo'], $results_row['username'],  '</strong></div>';



$following = following($_SESSION['userid']);


    if (in_array($key,$following)){
        echo ' <div action= "action.php" method="GET" data-theme="a">
        <input type="hidden" name="id" value="$key"/>
        <input type="submit" name="do" value="follow" data-theme="a"/>
</div>';

    }else{
        echo " <div action='action.php' method='GET' data-theme='a'>
        <input type='hidden' name='id' value='$key'/>
        <input type='submit' name='do' value='follow' data-theme='a'/>
        </div>";

}

}

        }

}

?>

How do i get the actual image to show on the page rather than the name of the image. I have the images in the file system under a folder called image. How do I echo that image on screen or if echo is not the right way to do it how would you do it?

  • 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-07T06:25:17+00:00Added an answer on June 7, 2026 at 6:25 am

    You mean like this?

    echo '<img src="'.$results_row['photo'].'" width="80">';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php require 'db.php'; include_once(header.php); include_once(functions.php); include_once(profile.php); if(isset($_POST['search_term'])){ $search_term = mysql_real_escape_string(htmlentities ($_POST['search_term'])); if(!empty($search_term)){ $search =
index.php <?php require_once('fr.php'); header('Location:'.abspath().directory()); ?> fr.php <?php require_once('functions.php'); ?> functions.php function abspath() { return
I've got a file header.php which is require()'d in just about every file within
I'm creating a drupal template and tried using this <?php require .base_path() . path_to_theme().'/header.php'
In PHP, if I use the include() or require() functions to start running code
from my logout.php : <?php require_once(includes/session.php); ?> <?php require_once(includes/functions.php); ?> <?php if ( isset(
i have this very simple php script: <?php require 'functions.php'; $token = some-number; $id
<?php require_once 'swift-mailer/lib/swift_required.php'; if (isset($_POST['submit'])) { //File upload // Where the file is going
here is my code: <?php require('...........'); require('................'); $search_query = strip_tags(substr($_POST['search_query'], 0, 60)); $region_query =
Some functions in PHP require a callback function. How can I do this in

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.