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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:53:11+00:00 2026-05-23T12:53:11+00:00

I need your help. I have tables using PHP while looping and I need

  • 0

I need your help.
I have tables using PHP while looping
and I need help on how to get the id from selected rows in the tables and then send it to another page. I need to do this because the tables do not view the details so I need that ID to view the details or query from full tables.

The following is my code

<?php

include('config.php');
session_start();

$table = "select * from rekuest";
$select = mysql_query($table);

$user = $_SESSION['username'];
?>
<head>
        <title>Home</title>
        <link href="css/960.css" rel="stylesheet" media="screen" />
        <link href="css/defaultTheme.css" rel="stylesheet" media="screen" />
        <link href="css/myTheme.css" rel="stylesheet" media="screen" />
        <script src="js/jquery-1.6.1.js"></script>

    <script src="js/jquery.fixedheadertable.min.js"></script>
    <script src="js/demo.js"></script>

    <style type="text/css" media="screen"> 
        #tombol {
            display: block;
            width: 90px;
            height: 30px;
            background: url(img/tombol_normal2.png) no-repeat top;
        }
        #tombol:active {
            background: url(img/tombol_pressed.png) no-repeat bottom;
        }
    </style> 

</head>
<body>
<h1 align="center">List All Of Request</h1>
<h2 align="center">Welcome, <?php echo $_SESSION['username']; ?></h2>

<form>
    <input type="button" name="new" value="New Request" align="right"
    onClick="window.location='form.php'"/>
    <input type="button" onClick="window.location = 'logout.php?exit=yes'" class="myButton" value="Logout"/>

</form>
<div id="divider">
</div>

<table width="900" align="center" cellpadding="0" cellspacing="0" class="myTable04">
    <thead>
        <tr>
            <th>No Reff</th>
            <th>Subjek Request</th>
            <th width="20px">Permintaan</th>
            <th>Waktu</th>
            <th>Jenis Request</th>
            <th>Customer</th>
            <th>Sifat Requirement</th>
            <th>Pelaksana</th>
            <th>Status</th>
            <th>Respon</th>
            <th>Rekomen</th>
            <th>Nama File</th>
            <th>Attachment</th>
            <th>Detail</th>
        </tr>
    </thead>
    <tbody>
    <?php while($row = mysql_fetch_array($select)) { ?>
        <tr>
            <td><?php echo $row['id_rekuest']; ?></td>
            <td><?php echo $row['subjek']; ?></td>
            <td><?php echo $row['permintaan']; ?></td>
            <td><?php echo $row['waktu']; ?></td>
            <td><?php echo $row['jenis']; ?></td>
            <td><?php echo $row['customer']; ?></td>
            <td><?php echo $row['sifat']; ?></td>
            <td><?php echo $row['pelaksana']; ?></td>
            <td><?php echo $row['status']; ?></td>
            <td><?php  ?></td>
            <td><?php  ?></td>
            <td><?php  ?></td>
            <td><?php  ?></td>
            <td><a id="tombol" style="cursor:pointer" onClick="window.location='detail.php'"></a></td>
        </tr>

    <?php } ?>
    </tbody>
</table>

  • 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-05-23T12:53:12+00:00Added an answer on May 23, 2026 at 12:53 pm

    I don’t 100% know what you’re asking, but I think what you want is to pass the id to the detail page. You could do this via a get with the following:

    <td>
        <a id="tombol" style="cursor:pointer" href="detail.php?id=<?php echo $row['id_rekuest']; ?>"></a>
    </td>
    

    And then use $_GET[‘id’] (sanitized, please!) to query the database for anything based on that id

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

Sidebar

Related Questions

I need your help, For example I have a decimal type variable and I
I've some questions .. and I really need your help. I have an application.
There is a problem I need help with your query on the data using
need some your help with a query. I have a table Managers (ManagerId, ManagerName)
please I need your help with a Linq expression: I have nested objects with
Need your help on the below. I have a table where I have functions
I need your help to define a special case in XML schema: A sequence
I really need your help in my issue very quickly and it's too close
I need your expertise once again. I have a java class that searches a
.NET developers out there! Need your opinion here! I am now using Visual Assist

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.