PDA

View Full Version : help me to delete user


najmun
06-20-03, 03:37 AM
i wanna delete a user in the employee table

this is deleted.php

<html>
<head>
<title> The Deleted Employee</title>
</head>
<body>
<?php
$db=mysql_connect("midc01","mmu","mmu4midc");
$dblink=mysql_select_db("CMS",$db);

$result=mysql_query("select * from EMPLOYEE where EMP_ID="."$emp_id.",$db);

$numrow=mysql_num_rows($result);
if($numrow>0)
{
mysql_query("delete * from EMPLOYEE where EMP_ID="."$emp_id",$db);
print("The Employee have been successfully deleted");

}
else print("There is no employee with that particular number");

?>
</body>
</html>

this is referred by del.html
<html>
<head>
<title>Delete An Employee></title>
</head>
<body><center>
<form method="POST" action="deleted.php">
<td align="centre">To DELETE AN EMPLOYEE FROM DATABASE</td><br>
<td align="centre">KEY IN THE EMPLOYEE ID</td>
<br>
<br>
Employee ID<input type="text" name="employee_id">
<br>
<br>

<input type="submit" name="submit" value="DELETE">
</form></center>
</body>
</html>

help !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
just new to php

phpkid
06-20-03, 05:23 AM
Wrong place to ask the quesion!

In fact cross posting to different forums is the worst thing you can do!

Delete this post from here!
Regards,
JD

Ryan
06-20-03, 12:04 PM
Please do not double post. You already posted this topic here (http://forums.hotscripts.com/showthread.php?s=&threadid=432). Thread closed.