escape_string($_GET['id']); if(isset($_POST['submit'])){ $email=$_POST['email']; $psw=$_POST['psw']; $first_name=$_POST['first_name']; $last_name=$_POST['last_name']; $phone=$_POST['phone']; $gender=$_POST['gender']; $dob=$_POST['dob']; $aboutme=$_POST['aboutme']; $address1=$_POST['address1']; $address2=$_POST['address2']; $city=$_POST['city']; $state=$_POST['state']; $country=$_POST['country']; $postal_code=$_POST['postal_code']; $pricing=$_POST['rating_option']; $department=$_POST['department']; extract($_POST); if(!empty($email)) : $table = 'doctors'; if(!empty($psw)) $password = md5($psw); else $password = $oldpsw; $pricing = $custom_rating_count!=''?$custom_rating_count:0; $path ="profile/"; $dr_image = $_FILES['dr_image']; $dr_image_filename = ''; if(!empty($dr_image['name'])){ if($old_dr_image != '' && file_exists($path.$old_dr_image)) : unlink($path.$old_dr_image); endif; //upload doctors image $dr_image_filename = $connect->image_upload($dr_image, $path, 1); //1 for either return filename or blank from function(optional) }else{ $dr_image_filename = $old_dr_image; } $department = implode(',', $department); //conver array to string to store in table $dr_fields = array( 'username' =>$email, 'password' =>$password, 'first_name' =>$first_name, 'last_name' =>$last_name, 'phone' =>$phone, 'gender' =>$gender, 'dob' =>$dob, 'about_me' =>$aboutme, 'dr_image' =>$dr_image_filename, 'address1' =>$address1, 'address2' =>$address2, 'city' =>$city, 'state' =>$state, 'country' =>$country, 'postal_code' =>$postal_code, 'pricing' =>$pricing, 'department' =>$department ); $last = $connect->update_data2('doctors', $dr_fields, array('id'=>$id)); $last_id = $id; if($last != 0) : //insert into dr_education table if(!empty($degree) || !empty($college) || !empty($deg_year)){ //if all are selected remove existing records and add new records $d = $connect->delete_data('dr_education', array('id'=>$id)); $count = count($degree); for($i=0; $i<$count; $i++){ $dr_education = array('id'=> $last_id, 'degree'=> $degree[$i],'college'=> $college[$i],'year'=> $deg_year[$i]); $connect->insert_data2('dr_education', $dr_education); } } //insert into dr_experience table if(!empty($hospital) || !empty($from_date) || !empty($to_date) || !empty($disignation)){ //if all are selected remove existing records and add new records $d = $connect->delete_data('dr_experience', array('id'=>$id)); $count = count($hospital); for($i=0; $i<$count; $i++){ $dr_exp = array('id'=> $last_id, 'hospital_name'=> $hospital[$i],'from_date'=> $from_date[$i],'to_date'=> $to_date[$i], 'designation'=> $disignation[$i] ); $connect->insert_data2('dr_experience', $dr_exp); } } //insert into dr_awards table if(!empty($awards) || !empty($award_year)){ //if all are selected remove existing records and add new records $d = $connect->delete_data('dr_awards', array('id'=>$id)); $count = count($awards); for($i=0; $i<$count; $i++){ $dr_aw = array('id'=> $last_id, 'award_name'=> $awards[$i],'year'=> $award_year[$i]); $connect->insert_data2('dr_awards', $dr_aw); } } //insert into dr_membership table if(!empty($membership)){ //if all are selected remove existing records and add new records $d = $connect->delete_data('dr_membership', array('id'=>$id)); $count = count($membership); for($i=0; $i<$count; $i++){ $dr_mb = array('id'=> $last_id, 'membership'=> $membership[$i]); $connect->insert_data2('dr_membership', $dr_mb); } } //insert into dr_registration table if(!empty($registration)){ //if all are selected remove existing records and add new records $d = $connect->delete_data('dr_registration', array('id'=>$id)); $count = count($registration); for($i=0; $i<$count; $i++){ $dr_mb = array('id'=> $last_id, 'registration'=> $registration[$i], 'year' => $reg_year[$i]); $connect->insert_data2('dr_registration', $dr_mb); } } endif; echo ''; else : echo ''; endif; } //echo "hi"; //get all records of doctors to show and edit $result = $connect->custom_query("SELECT * FROM doctors WHERE id=$id"); foreach($result as $res); $path = 'profile/'; //$specialist = explode(',',$res['specialization']); //$servicep = explode(',', $res['services']); ?>

Manage Doctor

Doctor Profile

Basic Information

User Image
Upload Photo
Allowed JPG, GIF or PNG. Max size of 2MB
Please enter email id.
Note: Leave it blank, if you don't want to change password

About Doctor

Contact Details

Pricing

>
>
>
Custom price you can add

Department

Note : Type & select specialization

Education

custom_query("SELECT * FROM dr_education WHERE id=$id"); $i=1; foreach($educ as $edu) : ?>
1) :?>

Experience

custom_query("SELECT * FROM dr_experience WHERE id=$id"); $i=1; foreach($expe as $exp) : ?>
1) :?>

Awards

custom_query("SELECT * FROM dr_awards WHERE id=$id"); $i=1; foreach($awar as $aw) : ?>
1) :?>

Memberships

custom_query("SELECT * FROM dr_membership WHERE id=$id"); $i=1; foreach($memb as $mem) : ?>
1) :?>

Registrations

custom_query("SELECT * FROM dr_registration WHERE id=$id"); $i=1; foreach($regi as $reg) : ?>
1) :?>