ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/apis/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/subamangala/admin/apis/select_profile.php

<?php 


include "../config/config.php";

error_log("page is working");

if(isset($_POST['type']) && $_POST['type']=='businees'){

     
     $profile_id = $_POST['profile_id'];
     
    //  error_log($profile_id. " businness id is " .$business_id);
     
     
    $person_profile = $pdo->prepare("SELECT * FROM `profiles` WHERE id =" .$profile_id);
    $person_profile->execute();
    $profile_result = $person_profile->fetchAll(PDO::FETCH_ASSOC);
 
    $condition = "";
    
        if ($profile_result[0][gender] == "பெண்") {
                        $condition = " AND gender = 'ஆண்'";
        } else {
            $condition = " AND gender = 'பெண்'";
        }
        //  if(!empty($_POST["business_id"])){
        //      $business_id = $_POST["business_id"];
        //      $condition.= " AND business_id ='.$business_id.' AND business_id '.$business_id.'";
        //  }
            $statement1 = $pdo->prepare("SELECT * FROM profiles".$condition);
            $statement1->execute();
            $profile_data = $statement1->fetchAll(PDO::FETCH_ASSOC);
            $totalData1 = $statement1->rowCount();
       
                                     
         if($totalData1>0){
             foreach ($profile_data as $profile_datas) { 
                echo   '<option value="'.$profile_datas['id'].'">' .$profile_datas['id'].'</option>';
            }
         }    else{
              echo   '<option value=""> No data found </option>';
         }
}else{
  /* echo '<option value="">Select Thirumanam First !!!</option>';*/
}

?>

Zerion Mini Shell 1.0