Hi Every body
Once again I'm in problem and want some help from you all
I have written a small code to search a particular value in MySql database and then to display the record based on that value - Like to search a Employee code in database and then to display detail of that Employee in same page after that if user want he/she can delete that record. But I am getting 2 error
Notice: Undefined index: dtext in C:\catasset\deleteadministrator.php on line 53
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\catasset\deleteadministrator.php on line 55
Please see the code mentioned here and I am attaching files for better understanding.
<body onload="fo();">
<h1>Welcome <font color="#FF6600"><?php echo $_SESSION['loginname']; ?></font></h1>| <a href="logout.php">Logout</a>
<p>This is a password protected area only accessible to members. </p>
<div align="center">
<form name="viby" method="post" action="">
<table width="366" border="1">
<tr>
<td><h2 class="style5">ENTER CUSTODIAN ID</h2></td>
<td><input name="dtext" type="text" /></td>
<td><input type="submit" name="Submit" value="VIEW" /></td>
</tr>
</table>
</form>
</div>
<form method="post" action="deleteadministratorexe.php">
<table width=100% border=1>
<tr>
<td width=42 height=28 bgcolor=#FFFF99>ID</td>
<td width=61 bgcolor=#FFFF99>CODE</td>
<td width=77 bgcolor=#FFFF99>Password</td>
<td width=92 bgcolor=#FFFF99>Departmenet ID </td>
<td width=77 bgcolor=#FFFF99>E-Mail</td>
<td width=108 bgcolor=#FFFF99>Security Level </td>
<td width=81 bgcolor=#FFFF99>Last Login </td>
<td width=92 bgcolor=#FFFF99>Account ID </td>
<td width=75 bgcolor=#FFFF99>Customer Name </td>
<td width=77 bgcolor=#FFFF99>Customer Rank </td>
<td width=123 bgcolor=#FFFF99>Customer PH </td>
</tr>
<?php
$qry = "SELECT * FROM users_table where cust_id = $_POST[dtext]" or die("Display Error: ".mysql_error());
$result = mysql_query($qry);
while($row=mysql_fetch_array($result))
{
echo " <tr>
<td><input name=t1 type=text id=t14 value=$row[0] ></td>
<td><input name=t2 type=text id=t2 value=$row[1] ></td>
<td><input name=t3 type=text id=t3 value=$row[2] ></td>
<td><input name=t4 type=text id=t4 value=$row[3] ></td>
<td><input name=t5 type=text id=t5 value=$row[4] ></td>
<td><input name=t6 type=text id=t6 value=$row[5] ></td>
<td><input name=t7 type=text id=t7 value=$row[6] ></td>
<td><input name=t8 type=text id=t8 value=$row[7] ></td>
<td><input name=t9 type=text id=t9 value=$row[8] ></td>
<td><input name=t10 type=text id=t10 value=$row[9] ></td>
<td><input name=t11 type=text id=t11 value=$row[10] ></td>
</tr>";
}
?>
<tr>
<td height="23" colspan="6"><input align="right" name="RESET" type="reset" id="RESET" value="Reset" /></td>
<td colspan="5"><input align="left" name="DELETE" type="submit" id="DELETE" value="Submit" /></td>
</tr>
</table>
</form>
||<a href="member.php"> GO TO INDEX</a>
</body>
</html>
Thanx in advance Please help me...!