hello
i have problem with my code
i try to delete user but i have some problem with that
i cant to delete it...

if((mysql_num_rows($resultAdmin)))
		{
			if(mysql_num_rows($result) > 0)
			{					
			?>

			<table align="left" border="2" cellspacing="0" cellpadding="3">
			<tr><td>Name</td><td>Email</td><td>Phone</td></tr>
			<?php
			$str = "";
			while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
			$name = $row["name"];
			$email = $row["email"];
			$phone = $row["phone"];
			
				echo "<tr><td>$name</td><td>$email</td><td>$phone</td></tr>\n";
			}
			?>
				</table>
				<br />
				<table align="left" border="0" cellspacing="0" cellpadding="3">
				<tr><td>Enter the email of the user that you want to delete:</td><td><input type="text" name="EmailDel" maxlength="30"></td><td><input type="submit" name="btnDel" value="Delete"></td></tr>
				</table>
				
				
			<?php 
			if(isset($_POST['btnDel'])){ // the program not run it when i click on submit! why???
					echo "asdasd";
					DeleteUser($_POST['EmailDel']);
					}
			}
			else
			{
				die("no details");
			}
		}
		else
		{
		  die("wrong password");
		}

Recommended Answers

All 4 Replies

Member Avatar for diafol

The DeleteUser function has a mistake on line 45.

Your input should be between the <form></form> tags and the form should have an action attribute set to the same page.

DeleteUser($_POST);?? What on earth is this beast?

lol...where is line 45? in the above code????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.