$_SESSION["userid"]; session_start(); $ses_u_id=$_SESSION["mobile"]; //$browsessionid=session_id(); //$browsessionid; /*if($_SESSION["mobile"]=="") { header("location:index.php"); } $ses_ma_id=$_SESSION["userid"]; $browsessionid=session_id();*/ ?> if(isset($_POST['Submit'])) { date_default_timezone_set('Asia/Kolkata'); $date = date('Y-m-d H:i:s ', time()); $name=trim(addslashes($_POST['name'])); $id_gender=trim(addslashes($_POST['id_gender'])); $phone=trim(addslashes($_POST['phone'])); $email=trim(addslashes($_POST['email'])); $password=trim(addslashes($_POST['p_word'])); $message=trim(addslashes($_POST['message'])); $address=trim(addslashes($_POST['address'])); $country=trim(addslashes($_POST['country'])); $consulting_for=trim(addslashes($_POST['con_for'])); $pincode=trim(addslashes($_POST['pincode'])); $city=trim(addslashes($_POST['city'])); $state=trim(addslashes($_POST['state'])); $id_lang=trim(addslashes($_POST['id_lang'])); $skypeid=trim(addslashes($_POST['phone'])); $dob1=trim(addslashes($_POST['dob'])); //$time=strtotime($dob1); $dob=date('Y-m-d', strtotime($dob)); $time_id=trim(addslashes($_POST['time_id'])); $time_id_1=strtotime($time_id); $date_id=trim(addslashes($_POST['date_id'])); $date_id_1=strtotime($date_id); $appointment_time=date('h:i a', $time_id_1); $appointment_date=date('Y-m-d', $date_id_1); $appointment_time_1=date('h', $time_id_1); $appointment_time_2=date('i', $time_id_1); $appointment_time_3=date('a', $time_id_1); //$time_t=date('h:i a', $time_id); //$date_t=date('Y-m-d', $date_id); $query_pag_num = "SELECT * FROM tbl_member where email='$email' "; $result_pag_num = mysql_query($query_pag_num); $rows = mysql_num_rows($result_pag_num); $Insert_Qry = "INSERT INTO tbl_member (`name`,`gender`,`phone`,`email`,`dob`,`password`,`language`,`skypeid`,`country`) VALUES ('$name','$id_gender','$phone','$email','$dob1','$password','$id_lang','$skypeid','$country')"; $Insert_Run = mysql_query($Insert_Qry) or die("Insert query error".mysql_error()); $attachmentfileid = mysql_insert_id(); if($ses_user_id!='') { } //$sessionid_free=$cust_id; $ses_u_id=$_SESSION["mobile"]; //$objqrynewsubee = "SELECT * FROM shop_user where phone='$ses_u_id'"; date_default_timezone_set('Asia/Kolkata'); $date = date('Y-m-d H:i:s ', time()); $login = "SELECT * from shop_user WHERE phone= '$ses_u_id' "; $resqry = mysql_query($login) or die("ERROR:".mysql_error()); $numrows = mysql_num_rows($resqry); if($numrows==0) { $Insert_Qry_12 = "INSERT INTO shop_user (`name`,`gender`,`phone`,`email`,`dob`,`password`,`language`,`skypeid`,`state`,`city`,`country`,`address`,`status`,`postcode`,`date`) VALUES ('$name','$id_gender','$phone','$email','$dob1','123456','$id_lang','$phone','$state','$city','$country','$address','1','$pincode','$date')"; $Insert_Run_12 = mysql_query($Insert_Qry_12) or die("Insert query error".mysql_error()); } $login_devi = "SELECT * from shop_user WHERE phone= '$ses_u_id' "; $resqry_devi = mysql_query($login_devi) or die("ERROR:".mysql_error()); $Fetitem_divi = mysql_fetch_array($resqry_devi); $ses_user_id=$Fetitem_divi["user_id"]; $country; $country=trim(addslashes($_POST['country'])); if($country=="India") { $amo=399; } else { $country; if($country=="Malaysia") { $amo=899; } else { $amo=1999; } } $amo; $upload_img = mysql_query("UPDATE tbl_appointment SET session_id='' WHERE session_id='".$browsessionid."'"); $Insert_Qry_1 = "INSERT INTO tbl_appointment (`mem_id`,`appointment_date`,`hour_date`,`min_date`,`am_date`,`des`,`email_id`,`session_id`,`status`,`consulting_for`,`amount`) VALUES ('$attachmentfileid','$appointment_date','$appointment_time_1','$appointment_time_2','$appointment_time_3','$message','$email','$browsessionid','0','$consulting_for','$amo')"; $Insert_Run_1 = mysql_query($Insert_Qry_1) or die("Insert query error".mysql_error()); $attachmentfileid_1 = mysql_insert_id(); if($_FILES['file']['name']!="") { $size = 190; // the thumbnail height $filedir = 'uploads/'; // the directory for the original image $thumbdir = 'uploads/'; // the directory for the thumbnail image $maxfile = '200000000000'; $mode = '0666'; $userfile_name = $_FILES['file']['name']; $userfile_tmp = $_FILES['file']['tmp_name']; //$userfile_name = $_FILES['uploadFile']['name']; //$userfile_tmp = $_FILES['uploadFile']['tmp_name']; $getExt = explode ('.', $userfile_name); $rand_name = md5(rand(000,999)); /* $prod_img = $filedir.$mysql_insert_id.$i.$getExt[0].".".$getExt[1];*/ $new_file_name = $userfile_name; //exit(); $new_file_name = str_replace('&','and',$new_file_name); $new_file_name = str_replace('#','',$new_file_name); $new_file_name = str_replace('+','',$new_file_name); $new_file_name=($attachmentfileid.$new_file_name); $prod_img = $filedir.$new_file_name; // original_images/456546565465465464jhh.jpg $items[] = $prod_img; $prod_img_thumb = $thumbdir.$getExt[0].".".$getExt[1]; //move_uploaded_file($userfile_tmp, $prod_img); //$upload_img = mysql_query("UPDATE tbl_appointment SET document_name='".$new_file_name."' WHERE id='".$attachmentfileid_1."'"); $id=$_REQUEST['id']; $m_id=$_REQUEST['m_id']; } header("location:appointment-confirmation.php"); } ?>