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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:20:29+00:00 2026-06-05T17:20:29+00:00

I have links on a PHP page where it lists all records from a

  • 0

I have links on a PHP page where it lists all records from a database.

The links look like this:

<a href="http://domain.com?id=1">View Records</a> <–ID at the end

What I want to do it to click on that link and option a popup what shows all fields from id 1

What’s the easiest way to show all fields where id=1 on a popup when I click the link?

For example: I have a table like this:

id | name | surname
--------------------
1  | Bob  | brown
2  | Ken  | blob

and I click on a link that looks like this:

<a href="http://domain.com?id=1">View Records</a>

I need a popup to open and display something like this:

ID - 1
Name - Bob
Surname - Brown
  • 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-05T17:20:31+00:00Added an answer on June 5, 2026 at 5:20 pm

    Very rudimentary example of one (of many ways) to popup a window::

    <a href="javascript:void(0)"onclick="window.open('http://domain.com/popup.php?id=1', 'View','width=300,height=200,menubar=yes,status=yes')">View Records</a>
    

    popup.php:

    <?php
        $con = mysql_connect("localhost","username","password");
        if (!$con) die('Could not connect: ' . mysql_error());
    
        mysql_select_db("my_database", $con);
        $result = mysql_query("SELECT * FROM MyTable WHERE myID=".$_GET['id']);
        $row = mysql_fetch_array($result);
        echo 'ID - '.$row['id'] . '<br/>';
        echo 'Name - '.$row['name'] . '<br/>';
        echo 'Surname - '.$row['surname'] . '<br/>';
        mysql_close($con);
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iframe tab which holds php page with various links inside (like
I have borrowed code from this link PHP regex templating - find all occurrences
I have a php page where I add and delete items from database using
lets say i have two pages links.html & contents.php ... first page contains only
I have the following link on index page <td align=center><a href=../athena/admin/update.php?id=' . $data [keyword]
I have a php script that grabs links from another website. I am storing
I have a link which looks like that: www.domain.com/file.php I want to create .htaccess
We currently have a quote page which lists all existing quotes that we would
I would like to have these urls as categories on my page: http://example.com/en/articles //for
Say I have a list of links in a folder, for example: http://www.site.com/folder/subfolder/subfolderfolder/hello-one.php http://www.site.com/folder/subfolder/subfolderfolder/hello-two.php

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.