Note that there are some explanatory texts on larger screens.

plurals
  1. POSend And Get ID from tables using PHP while looping
    primarykey
    data
    text
    <p>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.</p> <p>The following is my code</p> <pre><code>&lt;?php include('config.php'); session_start(); $table = "select * from rekuest"; $select = mysql_query($table); $user = $_SESSION['username']; ?&gt; &lt;head&gt; &lt;title&gt;Home&lt;/title&gt; &lt;link href="css/960.css" rel="stylesheet" media="screen" /&gt; &lt;link href="css/defaultTheme.css" rel="stylesheet" media="screen" /&gt; &lt;link href="css/myTheme.css" rel="stylesheet" media="screen" /&gt; &lt;script src="js/jquery-1.6.1.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.fixedheadertable.min.js"&gt;&lt;/script&gt; &lt;script src="js/demo.js"&gt;&lt;/script&gt; &lt;style type="text/css" media="screen"&gt; #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; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h1 align="center"&gt;List All Of Request&lt;/h1&gt; &lt;h2 align="center"&gt;Welcome, &lt;?php echo $_SESSION['username']; ?&gt;&lt;/h2&gt; &lt;form&gt; &lt;input type="button" name="new" value="New Request" align="right" onClick="window.location='form.php'"/&gt; &lt;input type="button" onClick="window.location = 'logout.php?exit=yes'" class="myButton" value="Logout"/&gt; &lt;/form&gt; &lt;div id="divider"&gt; &lt;/div&gt; &lt;table width="900" align="center" cellpadding="0" cellspacing="0" class="myTable04"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;No Reff&lt;/th&gt; &lt;th&gt;Subjek Request&lt;/th&gt; &lt;th width="20px"&gt;Permintaan&lt;/th&gt; &lt;th&gt;Waktu&lt;/th&gt; &lt;th&gt;Jenis Request&lt;/th&gt; &lt;th&gt;Customer&lt;/th&gt; &lt;th&gt;Sifat Requirement&lt;/th&gt; &lt;th&gt;Pelaksana&lt;/th&gt; &lt;th&gt;Status&lt;/th&gt; &lt;th&gt;Respon&lt;/th&gt; &lt;th&gt;Rekomen&lt;/th&gt; &lt;th&gt;Nama File&lt;/th&gt; &lt;th&gt;Attachment&lt;/th&gt; &lt;th&gt;Detail&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;?php while($row = mysql_fetch_array($select)) { ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $row['id_rekuest']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['subjek']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['permintaan']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['waktu']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['jenis']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['customer']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['sifat']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['pelaksana']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $row['status']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php ?&gt;&lt;/td&gt; &lt;td&gt;&lt;a id="tombol" style="cursor:pointer" onClick="window.location='detail.php'"&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload