ok

Mini Shell

Direktori : /home/shopnoc1/www/
Upload File :
Current File : /home/shopnoc1/www/stddelete.php

<?php
include("db.php");
if (isset($_GET['stid'])) {
	$id=$_GET['stid'];
	$select="SELECT * FROM admittedstudentinfo WHERE id=$id";
	$selectst=$conn->query($select);
  $delete = "DELETE FROM admittedstudentinfo WHERE id=$id";

if ($conn->query($delete) === TRUE) {
	if ($selectst->num_rows > 0) {
  // output data of each row
  while($rowst = $selectst->fetch_assoc()) {

  	if ($rowst['picture']!="") {
	unlink($rowst["picture"]);  		// code...
  	}
Header( 'Location: dashboard.php');
}
}}


 else {
  echo "Error deleting record: " . $conn->error;
}
$conn->close();
}
?>

Zerion Mini Shell 1.0