Skip to content

Instantly share code, notes, and snippets.

View Rameshwar-ghodke's full-sized avatar
💭
working as Web Designer

Rameshwar ghodke Rameshwar-ghodke

💭
working as Web Designer
View GitHub Profile
$newdata = array(
'username' => 'johndoe',
'email' => '[email protected]',
'logged_in' => TRUE
);
$this->session->set_userdata($newdata);
//In PHP, we can remove data stored in session using the unset() function as
<script>
$(document).ready(function () {
/** Email Validation ******/
$("#email_id").focusout(function(){
var email_to_check = $(this).val();
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Android_api extends CI_Controller {
public function index()
{
$this->load->view('login');
}
// after login get patient details so make API for Patient Detail using table name tbl_patient_detail
public function patient_details()
{
$query = $this->db->query("SELECT * from tbl_patient_details where is_deleted='N' ");
if($query->num_rows()>0)
{
//echo "Pass";
echo json_encode($query->result());
public function patient_details_search()
{
$patient_id=$_POST['patient_id']='1';
$first_name=$_POST['first_name']="parimal";
$phone=$_POST['phone']='9527070792';
$query = $this->db->query("SELECT * from tbl_patient_details where id ='".$patient_id."' or first_name ='".$first_name."' or phone ='".$phone."' and is_deleted='N'");
//echo $this->db->last_query();
public function Appointment_details_search()
{
$appointment_search=$_POST['appointment_search']='4';
$query = $this->db->query("SELECT appoint.*,patient.*,appoint.patient_id as patient_id from tbl_appointment_details as appoint, tbl_patient_details as patient where appoint.patient_id like('".$appointment_search."%') or appoint.patient_name like('".$appointment_search."%') or appoint.referral_contact like('".$appointment_search."%') and appoint.is_deleted='N' and appoint.patient_id=patient.patient_id group by appoint.patient_id");
//echo $this->db->last_query();
if($query->num_rows()>0)
$(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip({ placement : 'bottom' }); });
<select required id="disability" class="form-control" data-toggle="tooltip" title="If you have disability yes then write it in About me field." onchange="checkOther(this)" >
<option value="">Select</option>
<option value="Yes">Yes </option>
<option value="No">No </option>
</select>
var dob = wholedata[4];
if(dob.length==0)
{
AgeYear=0;
$("#user_age").val(AgeYear);
}
else
{
BirthDate=dob.split("-");
following code paste in Master.php controller
public function reception()
{
try {
$table1='tbl_master_reception';
$where1=array('is_deleted'=>'N');