Jump to content
missyayad

Need Help In Php

Recommended Posts

 OBJECTIVE

:

          i.          Develop E-HEALTH CARE online system

        ii.          Insert ,update,delete record and search patient record.

      iii.          Generate statistic monthly, and yearly patient record.

 

1.4 SCOPE

 E-Healthy Care divided into two user scope and scope system

 

1.4.1 The scope of the system

System administrator is a user to manage appointment and update information of  E-Health care

i.System can display all the name of patient or students which come to make a treatment.

ii. System can record and save data information of patient automatically.

iii. System can display all information about healthy to users

 

1.4.2 The scope of the user  

 

a)MEDICAL ASSISTANT

 i.  Can delete, update, insert, record and drop the data in the system.

ii.  Can update new information about healthy for users

. iii.  can list down by automatically list of patient by using id card.

iv. Can list down the statistic of patient by day, week and monthly.

 

b. )patient

 i.  can make online appointment with medical assistant.

ii.  Can login the system

iii. can check report up-to-date with medical assistant

iv.  Can get more information about healthy

 

ni adalah detail untuk projek saya , pless help me .



yup php n mysql . dekat atas  ni detail system saya . boleh bantu?

Share this post


Link to post
Share on other sites
Hmm cuba buat guna framework php. CakePHP ke, CodeIgniter ke, or yang tengah popular skg ni Laravel.

Requirements dah ada, boleh proceed dengan use case bagai. Lagi senang nak tengok and develop.

Boleh start dengan CRUD function untuk admin.

Share this post


Link to post
Share on other sites

salam . ada sesiapa boleh share kan ilmu tak . saya cuba try buat login for 2 user , untuk admin and patient , saya gunakan kaedah if else untuk pggl . buat database tak dapat recgnise . , kenapa ye ? ada tak cara lain yang otai otai tahu ?or something page yang boleh share ? need help . thnank

Share this post


Link to post
Share on other sites

salam . ada sesiapa boleh share kan ilmu tak . saya cuba try buat login for 2 user , untuk admin and patient , saya gunakan kaedah if else untuk pggl . buat database tak dapat recgnise . , kenapa ye ? ada tak cara lain yang otai otai tahu ?or something page yang boleh share ? need help . thnank


please share your code..baru kita boleh check dan tgk kat mana yang silap.

Share this post


Link to post
Share on other sites

Yup boleh buat, lihat code di bawah.

 

<?php 
$_SESSION['user_role']= $user_role; 

//this should be a field in DB for each user 
//============Add other codes that needs no Admin rights========== 
//If this page needs admin access then put this code 

if( $_SESSION['user_role']=='admin')
{
   echo "Welcome Admin!"; 
} 
else
{ 
   echo "Access denied: You are not a admin!"; 
} ?>

 

Code ini berkisahkan dimana admin sahaja yang boleh akses. Jadi dalam table user, biasanya ada 4 column iaitu ID, user_name, password, user_role.

 

Jadi katakan ada 2 record iaitu :

  1. chuki2, 1234, admin 
  2. payad, 1234, normal 

 

So sis kena buat query dalam page login, dan gunakan session untuk akses ke page admin. Lihat contoh sperti dibawah : 

//Buat query terlebih dahulu!
//Contoh result selepas query 

while ($row = mysql_fetch_assoc($query)) 
{ 
   $dbusername=$row['user_name']; 
   $dbpassword=$row['password']; 
   $dbuserrole=$row['user_role'];
} 
if ($dbuserrole == "admin")
{
   header('Location: http://mysite.com/admin.php?  id='.$_SESSION['user_role']=$dbuserrole);
}
else 
{
   header('Location: http://mysite.com/normal.php?id='.$_SESSION['user_role']=$dbuserrole); 
} 

 

 

Kalau user_role sebagai admin, dia akan direct ke page admin.php.

 

Kalau user_role sebagai normal, dia akan direct ke normal.php.

 

So ada paham? :D

Edited by Chuki2

Share this post


Link to post
Share on other sites
Kalau user_role sebagai admin, dia akan direct ke page admin.php.

Kalau user_role sebagai normal, dia akan direct ke normal.php.

So ada paham? :D

terbaik.. :32:

Share this post


Link to post
Share on other sites

awek cepat je chuki2, siap bagi kod. mana tau lelaki gemuk gedempol dibelakang skrin :153:

 

3 hari tak reply...setel dah kot.

Share this post


Link to post
Share on other sites

awek cepat je chuki2, siap bagi kod. mana tau lelaki gemuk gedempol dibelakang skrin :153:

 

3 hari tak reply...setel dah kot.

Choiiiii. Mana ada. Kalau lain2 pun aku tolong gak... tapi selow la sikit....  :155:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...