PHP Borrar Registro


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /// BORRAR NOVEDAD
  2. if(rpost("action")=="del"){
  3. $id=rpost("id");
  4. $rn=query("select * from trabajos where id=".$id);
  5.  
  6. if(is_file("../img/".ver($rn, 0, "imagen")))
  7. unlink("../img/".ver($rn, 0, "imagen"));
  8.  
  9.  
  10. query("delete from trabajos where id=".$id);
  11. $mensaje="Trabajo eliminado correctamente";
  12.  
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.