PHP MYSQL: Delete user -


i have form that, when submitted, delete users profile processing deleteuser.php.

<form method='post' action='deleteuser.php'>     <input type='submit' name='delete' value='delete profile'> 

and here deleteuser.php

session_start(); include("config.php");  if(isset($_post['submit'])){      $id = $_session['uid'];          $sql = "delete users id='$id'";     mysql_query($sql) or die(mysql_error());     echo "user has been sucessfully deleted!"; } else{     echo "error: user not deleted"; } 

now getting "user not deleted".

any idea why?

as said @showdev, form post data associated name tag, i.e. since

<input type='submit' name='delete' value='delete profile'> 

as name tag set "delete", must access via $_post['delete']


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -