View Mentor
$val){ $image_name = $_FILES['images']['name'][$key]; $tmp_name = $_FILES['images']['tmp_name'][$key]; $size = $_FILES['images']['size'][$key]; $type = $_FILES['images']['type'][$key]; $error = $_FILES['images']['error'][$key]; //$random_digit=rand(0000,9999); // File upload path $fileName = basename($_FILES['images']['name'][$key]); $fileName = "brgs" . rand(10000,99999) . "." . 'jpg'; $targetFilePath = $targetDir . $fileName; // $date = date('y-m-d', strtotime($_POST['date'])); $name = $_POST['name']; $stories = $_POST['stories']; // Check whether file type is valid $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); if(in_array($fileType, $allowTypes)){ // Store images on the server if(move_uploaded_file($_FILES['images']['tmp_name'][$key],$targetFilePath)){ $images_arr[] = $targetFilePath; $insert = $conn->query("INSERT into leadershipteam (file_name, name, stories, uploaded_on) VALUES ('".$targetFilePath."','".$name."', '".$stories."',NOW())"); if($insert){ //$count = $key + 1; $statusMsg = "
Add Mentor
$val){ $image_name = $_FILES['images']['name'][$key]; $tmp_name = $_FILES['images']['tmp_name'][$key]; $size = $_FILES['images']['size'][$key]; $type = $_FILES['images']['type'][$key]; $error = $_FILES['images']['error'][$key]; //$random_digit=rand(0000,9999); // File upload path $fileName = basename($_FILES['images']['name'][$key]); $fileName = "brgs" . rand(10000,99999) . "." . 'jpg'; $targetFilePath = $targetDir . $fileName; // $date = date('y-m-d', strtotime($_POST['date'])); $name = $_POST['name']; $stories = $_POST['stories']; // Check whether file type is valid $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); if(in_array($fileType, $allowTypes)){ // Store images on the server if(move_uploaded_file($_FILES['images']['tmp_name'][$key],$targetFilePath)){ $images_arr[] = $targetFilePath; $insert = $conn->query("INSERT into leadershipteam (file_name, name, stories, uploaded_on) VALUES ('".$targetFilePath."','".$name."', '".$stories."',NOW())"); if($insert){ //$count = $key + 1; $statusMsg = "