When 'Papar' clicked, it should be go to view page. Primary key: 'IC NO'. Here is the code:
当'Papar'点击时,它应该去查看页面。主键:'IC NO'。这是代码:
<?php
$ic_no=$_REQUEST['ic_no'];
require_once "connection.php";
$conn=connect();
$db=connectdb();
mysql_select_db($db,$conn) or die (mysql_error()."\n");
$query_usr="select * from aduan,pendaftaran";
$usr=mysql_query($query_usr,$conn) or die(mysql_error()."\n".$query_usr);
$row_usr=mysql_fetch_assoc($usr);
?>
<html><head></head><body>
<?php
$view="SELECT * FROM aduan,pendaftaran where $ic_no='ic_no'";
$result=mysql_query($view,$conn);
?>
<center><body bgcolor="#FFFFFF">
<data-role="header" data-position="fixed">
<img src="imagess/header.jpg" width="1069" height="90" >
<table width="1059"><td height="59"></td>
<td><fieldset>
<legend><b>Maklumat Aduan</b>
</legend>
<?php
$view = "SELECT * FROM aduan,pendaftaran";
$result = mysql_query ($view, $conn);
$row=mysql_fetch_array($result);
?>
<center><table width="585" height="100" border="0">
<tr>
<td width="424">NAMA PELAJAR</td>
<td width="24">:</td>
<td width="300"><?php echo $row["nama"];?></td>
</tr>
<tr>
<td>IC</td>
<td>:</td>
<td><?php echo $row["ic_no"];?></td>
</tr>
<tr>
<td>EMAIL</td>
<td>:</td>
<td><?php echo $row["email"];?></td>
</tr>
<tr>
<tr>
<td>TEL NO</td>
<td>:</td>
<td><?php echo $row["tel_no"];?></td>
</tr>
<tr>
<td>JANTINA</td>
<td>:</td>
<td><?php echo $row["jantina"];?></td>
</tr>
<tr>
<td>MATRIK NO</td>
<td>:</td>
<td><?php echo $row["matrik_no"];?></td>
</tr>
<tr>
<td>JABATAN</td>
<td>:</td>
<td><?php echo $row["jabatan"];?></td>
</tr>
<tr>
<td>ALAMAT</td>
<td>:</td>
<td><?php echo $row["alamat"];?></td>
</tr>
<tr>
<td>POSKOD</td>
<td>:</td>
<td><?php echo $row["poskod"];?></td>
</tr>
<tr>
<td>NEGERI</td>
<td>:</td>
<td><?php echo $row["state"];?></td>
</tr>
<tr>
<td width="424">ID GERAI</td>
<td width="24">:</td>
<td width="300"><?php echo $row["id_gerai"];?></td>
</tr>
<tr>
<td>JENIS ADUAN </td>
<td>:</td>
<td><?php echo $row["jenis_aduan"];?></td>
</tr>
<tr>
<td>TARIKH</td>
<td>:</td>
<td><?php echo $row["tarikh"];?></td>
</tr>
<tr>
<tr>
<td>LOKASI</td>
<td>:</td>
<td><?php echo $row["lokasi"];?></td>
</tr>
<tr>
<td>MAKLUMAT ADUAN</td>
<td>:</td>
<td><?php echo $row["aduan"];?></td>
</tr>
</div>
</table>
</form></br>
</fieldset></td></center>
</div>
</body></html>
When I click to 'Papar' (second row) which is data for second user, Its still show data from the first user.
当我点击作为第二个用户的数据的'Papar'(第二行)时,它仍显示来自第一个用户的数据。
Please help me out Anyone?
请帮帮我吗?
1 个解决方案
#1
0
The one thing I immediately see is
我立即看到的一件事是
$view="SELECT * FROM aduan,pendaftaran where $ic_no='ic_no'";
your column and parameters are backwards. It should be
您的列和参数是向后的。它应该是
'ic_no' = $ic_no
at the very least.
至少。
#1
0
The one thing I immediately see is
我立即看到的一件事是
$view="SELECT * FROM aduan,pendaftaran where $ic_no='ic_no'";
your column and parameters are backwards. It should be
您的列和参数是向后的。它应该是
'ic_no' = $ic_no
at the very least.
至少。