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 8570039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:28:13+00:00 2026-06-11T18:28:13+00:00

I am working on some functionality where having performed an initial search, a subset

  • 0

I am working on some functionality where having performed an initial search, a subset of profile details are being displayed. This works fine.

There is then a link called ‘View Full Profile’ which if clicked should return the entire profile.

I have got this working with a hardcoded id, but am not sure how to pass in the id of the profile from the subset of information?

I don’t actually know if that value (the id of the profile) is currently available for me to acccess so that I can pass it in if that makes sense?

In the subset of profile details I have included a hidden field which does contain the id I would like to pass in but I’m not sure if this can be used?

The relevant code is posted below.

SUBSET-PROFILE.HTML.PHP

    <div id="Profile" class="Profile"  >

    <h1 class="margin-top">Search Results</h1>

    <?php if (isset($results)): ?>

    <?php foreach ($results as $result): ?>

    <ol class="coach-display">
    <li class="left image">
      <img src="<?php if (!empty($result['filename'])) echo('?action=view&id=' . $result['id']); else echo "/img/profile_coming_soon.jpg" ?>" width="80" height="80" />
      </li>
    <li class="listleft">First Name:</li>
    <li><?php htmlout($result['firstname']); ?></li>

    <li class="listleft">Last Name:</li>
    <li><?php htmlout($result['lastname']); ?></li>

    <li class="listleft">Constituency:</li>
    <li><?php htmlout($result['constituency']); ?></li>

    <li class="listleft">Qualifications:</li>
    <li><?php htmlout($result['qualifications']); ?></li>

    </ol>

    <input type="hidden" name="id" value="<?php htmlout($result['id']); ?>">

    <a href="?more">View full profile</a>

    <?php endforeach; ?>

    <?php endif; ?>

    </div>

INDEX.PHP

    if (isset($_GET['more']))
    {
        try
        {

        $sql = "SELECT id, firstname, lastname, area, county, constituency, qualifications, bio, monday, tuesday, wednesday, thursday, friday, saturday, sunday,
                filename, mimetype
                FROM pt
                WHERE id = 6";
        $s = $pdo->query($sql);
        }
        catch (PDOException $e)
        {
            $error = 'Error fetching pt details.' . $e->getMessage();;
            include 'profiles.html.php';
            exit();
        }

You can see in INDEX.PHP where I have hard coded the value to 6. This is the value that I need to be dynamic dependent on which profile subset was previously being viewed.

Thanks for your time and help on this.

  • 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-11T18:28:14+00:00Added an answer on June 11, 2026 at 6:28 pm

    change

    <a href="?more">View full profile</a>
    

    to

    <a href="?more&id=<?php htmlout($result['id']); ?>">View full profile</a>
    

    Now you can get id value using $_GET['id']..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So my code has been working fine, and I was added some extra functionality
I am having a few issues trying to get some basic jquery functionality working
I'm working on implementing some Chrome-like tab functionality in an app and am having
I've just added some search functionality to a project of mine which is working
I am working on converting the functionality of some JSP pages to GWT. I
Whilst working on some generally horrible Javascript code this morning, I came across the
I'm having some trouble working with libraries and included xib files. Let me explain
I am currently working on a mini 'framework' and I am having some difficulties.
I had a question about boost python. I've been working on exporting some functionality
I am working on having the following functionality for my mvc website. I want

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.