i have 3 different table in 1 database.. and i want to let my user see their own profile by using search.. but, my user will divide by those 3 program and their details may be only in one table..
how can i let my user choose their program using menu/list??
mm.. tell me if you guys don't understand my explanation..
this is my own code...
<title>US1M</title>
<form method="post" action="">
<div align="center">
<p> </p>
<table width="523" height="234" border="0">
<tr>
<td width="513"> </td>
</tr>
<tr>
<td height="126"><div align="center">
<p>Sila Pilih Jenis Koperasi dan Masukkan No Kad Pengenalan untuk carian</p>
<p>Contoh : 880101025432</p>
</div>
<p align="center">
<label>
<select name="koperasi" id="koperasi">
<option selected>(Jenis Koperasi)</option>
<option>Koperasi Sutrawati</option>
<option>Koperasi Iltizam</option>
<option>Koperasi Makmur</option>
</select>
</label>
</p>
<p align="center">
<label>
<input type="text" name="noIC" id="noIC" />
</label>
<input type="submit" name="cari" id="cari" value="Submit" />
</p></td>
</tr>
<tr>
<td><?php
//connect to database
require("connect.inc");
$SQL_FROM = 'koperasi';
if (isset($_POST['cari']))
{
if(isset($_POST['noIC']))
$data = mysql_query("SELECT * FROM {$_POST['koperasi']} where noic='{$_POST[ 'noIC' ]}' LIMIT 1") or die(mysql_error());
while($info = mysql_fetch_array( $data )) {
//Outputs the data
echo "<tr><td><center><table border=0 width=70%><tr><td><b>Nama Pemilik</b></td><td>".$info['namaPemilik'] . "</td></tr>";
$infodata = mysql_num_rows($data);
}
}
if ($no_ic == ''){
echo "<font color='red'>SILA PASTIKAN ANDA MASUKKAN NOMBOR KAD PENGENALAN YANG SAH!";
} else
if ($infodata == 0){
echo "<font color='red'>MAAF, MAKLUMAT YANG DICARI TIADA DALAM PANGKALAN DATA KAMI!";
}
?></td>
</tr>
</table>
</div>
<p> </p>
<p> </p>
<p>
<label></label>
</p>
<p> </p>
</form>
thank you...