Page 1 of 6 1 2 3 ... LastLast
Results 1 to 15 of 79

Thread: kasi guideline sket....

  1. #1
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0

    Lightbulb kasi guideline sket....

    mmm...
    aku tgh buat satu sistem guna php ni...
    skang ni,masalah aku...
    aku tak reti nak buat search function utk cari maklumat patient yg ada dlm database...skang ni,aku guna access sbg d/base...
    so,ada sesaper leh tlg tak???
    plzz....bende ni ada kaitan ngan kelulusan aku utk praktikal ni...



  2. #2
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Hi,

    If your trying to search for records in your database, just modify your SQL string... for example

    PHP Code:
    SELECT FROM patient WHERE PatientName LIKE '" . $_GET['PatientName'] . "%' ORDER BY PatientName ASC
    So in an input box, if you input 'id' it will output all the record starting with 'id' that is, for example, idham or idros, etc.

    By the way, from experience, you might run into a few problems interfacing PHP with Access - but it shoud be fine if your just going to add records to the database and viewing the records. You might be better of with MySQL if you're going to do anything more than that.

  3. #3
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    thanks a lot 4 your info....
    aku rasa,membantu sket...
    tapi,kalau aku nak search guna date appointment,tapi user kena masukkan 2. tarikh.....iaitu tarikh dari dan hingga tarikh.........
    macamana yer.???
    mmg pada mulanya,database,aku nak buat pakai mysql...
    tp,memandangkan aku still tak expert pasal mysql,aku guna la apa yg ada dan aku reti...
    thanks sufyan..
    aku seadanya...

  4. #4
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    soalan kedua...
    kat bawah ni coding utk interface aku...
    tp,maklumat dr.database tak kuar la kat paparan..
    dia nyer table dan berapa rekod jer yg kuar...
    ada sesaper leh bantu?

    <?php
    function HTML_Head(){
    echo"
    <HTML><HEAD>
    <TITLE>Processing Form</TITLE>
    </HEAD>
    <BODY BGCOLOR=\"#ccccff\">";
    }
    function HTML_Foot(){
    echo"</body></html>";
    }
    function Database_Entries($msg){
    echo $msg;
    }
    function Output_Entries(){

    $cnx=odbc_connect('Pesakit','root','');
    if(!$cnx){
    Error_handler("Error in odbc_connect",$cnx);
    }
    $cur=odbc_exec($cnx, "select Bil, Nama, noTelefon, RN, Lokasi, Umur,Cardiologist,Jantina, jenisAkaun, provisionalDiagnosis, Prosedur, Findings, Plan from maklumatPesakit");
    if(!$cur){
    Error_handler("Error in odbc_exec(no cursor returned)",$cnx);
    }
    echo"<table border=1><tr><th>Bil</th><th>Nama</th>".
    "<th>NoTelefon</th><th>RN</th>"."<th>Lokasi</th><th>Umur</th>"."<th>Cardiologist</th><th>Jantina</th>"."<th>Jenis Akaun</th><th>Provisional Diagnosis</th>"."<th>Prosedur</th><th>Findings</th>"."<th>Plan</th></tr>\n";
    $nbrow=0;

    while( odbc_fetch_row($cur)){
    $nbrow++;
    $Bil= odbc_result($cur,1);
    $Nama= odbc_result($cur,2);
    $noTelefon= odbc_result($cur,3);
    $RN= odbc_result($cur,4);
    $Lokasi= odbc_result($cur,5);
    $Umur= odbc_result($cur,6);
    $Jantina= odbc_result($cur,7);
    $jenisAkaun= odbc_result($cur,8);
    $Cardiologist= odbc_result($cur,9);
    $provisionalDiagnosis= odbc_result($cur,10);
    $Prosedur= odbc_result($cur,11);
    $Findings= odbc_result($cur,12);
    $Plan= odbc_result($cur,13);

    echo"<table border=1><tr><th>$bil</th><th>$Nama</th>"."<th>$noTelefon</th><th>$RN</th>"."<th>$Lokasi</th><th>$Umur</th>"."<th>$Cardiologist</th><th>$Jantina</th>"."<th>$jenisAkaun</th><th>$provisionaldiagnosis</th>"."<th>$Prosedur</th><th>$Findings</th>"."<th>$Plan</th></tr>\n";
    }
    echo"<tr><td colspan=2>$nbrow entries</td></tr></table>";
    odbc_close($cnx);
    }

    function Error_Handler($msg,$cnx){
    echo"$msg\n";
    odbc_close($cnx);
    exit();
    }

    function Enter_New_Entry($bil,$Nama,$noTelefon,$RN,$Lokasi, $Umur,$Cardiologist,$Jantina,$jenisAkaun,$provisio naldiagnosis,$Prosedur,$Findings,$Plan){
    echo "BIL:$bil<br>";
    $cnx=odbc_connect('Pesakit','root','');
    if(!$cnx){
    Error_handler("Error in odbc_connect",$cnx);
    }

    $SQL_Exec_String="Insert Into maklumatPesakit (Bil,Nama,noTelefon,RN,Lokasi,Umur,Cardiologist,Ja ntina,jenisAkaun,provisionalDiagnosis,Prosedur,Fin dings,Plan) values ('$bil','$Nama','$noTelefon','$RN','$Lokasi','$Umu r','$Cardiologist','$Jantina','$jenisAkaun','$prov isionaldiagnosis','$Prosedur','$Findings','$Plan') ";

    $cur=odbc_exec($cnx, $SQL_Exec_String);
    if(!$cur){
    Error_handler("Error in odbc_exec(no cursor returned)",$cnx);
    }

    odbc_close($cnx);
    }
    $strOldEntries="Maklumat Dalam Pangkalan Data";
    $strNewEntries="Maklumat Terkini Dalam Pangkalan Data";

    HTML_Head();
    Database_Entries($strOldEntries);
    Output_Entries();
    echo "BIL2:$bil";
    Enter_New_Entry($bil,$Nama,$noTelefon,$RN,$Lokasi, $Umur,$Cardiologist,$Jantina,$jenisAkaun,$provisio naldiagnosis,$Prosedur,$Findings,$Plan);
    Database_Entries($strNewEntries);
    Output_Entries();
    HTML_Foot();
    ?>
    aku seadanya...

  5. #5
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Hi,

    Could you give more information, such as a screen dump of your results (output) or the URL (if it's online) or even better, a copy of your database. This is because it would be easier to solve the problem if I or anyone else could simulate the problem.

  6. #6
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    ok...
    ni database guna access...
    http://www.geocities.com/shy_za19/sist.zip

    hope u can help...
    aku seadanya...

  7. #7
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    ni print screen database yg telah dimasukkan..
    tp,maklumat tak keluar pada screen..
    http://www.geocities.com/shy_za19/interface.txt
    aku seadanya...

  8. #8
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    I have downloaded the database and I'm having a look at it now.

  9. #9
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Done...

    Attached is the zip with the modified database and script... sorry I changed the script completely... but I think your script was too complicated... I simplified it a bit... You can modify it as you like.
    Attached Files Attached Files
      To view attachments your post count must be 0 or greater. Your post count is 0 momentarily.

  10. #10
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Attached is a screen dump of what the output should look like.

    Changes
    * The only change I made to your database was I added Primary Keys to your two tables. I didn't find a use for your 'temujanji' table, so I just left it.
    * I changed most of your script... The only part I copied was the database connection. This means that all the error handlers that you had in your previous script is no longer there... But those error handlers were useless. You header and footer functions were eliminated, I didn't see the point of that.
    * I didn't know what the second half of your script was suppose to output, so I just left that out... but you should be able to modify the new script to your needs.

    That's about it
    Attached Images Attached Images To view attachments your post count must be 0 or greater. Your post count is 0 momentarily.

  11. #11
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    thanks a lot....
    i really appreciate it....
    *_*

    u helps a lot...
    aku seadanya...

  12. #12
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    why this warning appear when i run ur pesakit.php?

    Warning: Field index is larger than the number of fields in c:\phpdev\www\pesakit.php on line 88
    aku seadanya...

  13. #13
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    opss...
    problem solve....
    field tu lbh satu jer..
    thanks a lot...
    aku seadanya...

  14. #14
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Use the new database, because I added a primary key. The old database had only 13 fields - the new one has 14. That's why your getting that error.

  15. #15
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    opss...
    other problem...
    bila saya masukkan data dalam form,data tu tak post ke database...
    kenape yer??
    ni coding form saya...


    <?php
    function HTML_Head(){
    echo"
    <HTLM><HEAD>
    <TITLE>Maklumat Pesakit</TITLE>
    </HEAD>
    <BODY BGCOLOR=\"#ccccff\">";
    }
    function HTML_Form(){
    echo"
    <FORM NAME=\"AccessInterface\"METHOD=post ACTION=\"pesakit.php\">
    <strong></strong><h2><div align=\"center\"><font color=\"#000000\">MAKLUMAT PESAKIT</font></div></h2><br>
    <strong>Sila Masukkan Maklumat Pesakit.</strong></div><br>
    Nama : <input name=\"Nama\"TYPE=\"text\"SIZE=\"50\"><br><br>
    No.Telefon : <input name=\"noTelefon\"TYPE=\"text\"SIZE=\"21\">
    R/N : <input name=\"RN\"TYPE=\"text\"SIZE=\"26\"><br><br>
    Lokasi : <input name=\"Lokasi\"TYPE=\"text\"SIZE=\"25\">
    Umur : <input name=\"Umur\"TYPE=\"text\"SIZE=\"5\">
    Cardiologist : <select name=\"Cardiologist\" SIZE=\"1\">
    <option value=\"khalid yusof\">KY</option>
    <option value=\"Tamil Selvam\">TSM</option>
    <option value=\"CK yeo\">CKY</option>
    <option value=\"Yoon Lai Lan\">YLL</option>
    <option value=\"Shaiful\">SAY</option>
    </select><br><br>
    Jantina : <input type=\"radio\" name=\"Jantina\" value=\"Female\" checked>Perempuan<input type=\"radio\" name=\"Jantina\" value=\"Male\">Lelaki<br><br>
    Jenis Akaun : <input type=\"radio\" name=\"jenisAkaun\" value=\"Private\" checked>Berbayar<input type=\"radio\" name=\"jenisAkaun\" value=\"Government\">Percuma<br><br>
    Provisional Diagnosis : <textarea name=\"provisionaldiagnosis\"></textarea>
    Prosedur : <textarea name=\"Prosedur\"></textarea><br><br>
    Findings : <textarea name=\"Findings\"></textarea>
    Plan : <textarea name=\"Plan\"></textarea><br><br>

    <div align=\"center\"><input type=\"submit\" name=\"Submit\" value=\"Simpan\">
    <input type=\"reset\" name=\"Reset\" value=\"Padam\"></div>
    </form>
    ";
    }
    function HTML_Foot(){
    echo"</body></html>";
    }
    HTML_Head();
    HTML_Form();
    HTML_Foot();
    ?>
    aku seadanya...

Page 1 of 6 1 2 3 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Guideline on seeking help in this thread
    By yipguseng in forum Website Programming
    Replies: 9
    Last Post: 02-09-2010, 11:05 PM
  2. 1 Month Old Website with PR6. DIY Guideline. [Free PR6+ backlinks]
    By louiss in forum Other Webmaster-related Services and Promotion
    Replies: 0
    Last Post: 08-05-2007, 03:35 PM
  3. tlg check sket code ni
    By prozone in forum Website Programming
    Replies: 3
    Last Post: 04-08-2005, 10:17 PM
  4. Nak tanya sket
    By jepp in forum Website Programming
    Replies: 2
    Last Post: 18-03-2005, 01:05 PM
  5. Boleh kasi komen web site ni tak ?
    By myravens in forum Websites Review and Suggestion
    Replies: 9
    Last Post: 29-08-2003, 06:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112