Page 1 of 2 1 2 LastLast
Results 1 to 15 of 24

Thread: coding..arghh!!

  1. #1
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    Question coding..arghh!!

    akum sume.....

    errm...saya ade masalah camne nak integrate kan php + wml + mysql....takder contoh coding nak refer...yg ada sume guna ASP...dah laa kena buat sensorang WAP site nih,......iskk,,,,sesapa yg sudi membantu beri kepahaman pada saya?

  2. #2
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    Unhappy iskk...

    takder yg sudi nak tolong ker..iskk....ini ader kaitan ngan kelulusan saya utk praktikal nih....

    roger roger please.....
    mayday mayday...

  3. #3
    Join Date
    Sep 2003
    Location
    Kuala Lumpur
    Posts
    10
    Rep Power
    0
    ish! ish! ish! sian kat awak ye.. saya nak tolon pun x boleh..x reti sgt pasal wap ni..takpe..sikit2 lagi adaer la org tulun...sabar yek

  4. #4
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Hi there... Give more details on what you're trying to do.

  5. #5
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    takleh retrieve db

    camnie, saya nak buat WAP development...

    saya kena guna PHP + MySQL + WML...

    saya guna handset emulator utk display kan screen/output...

    masalah saya skrg, saya tak tahu kenapa data yg saya cuba retrieve dr db takmo kuar....bila compile takde error...
    contoh kebanyakkannya sume guna ASP...saya web programming ni baru nak mencuba2....jadinya, PHP je laa yg ok sket....

  6. #6
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    coding

    nihh contoh yg saya buat....


    <card id="third" title="Availability">

    <p><?php
    $db = mysql_pconnect("localhost","" , "") or die ("capaian gagal");
    mysql_select_db("myThesis",$db);

    $list1 = mysql_query("SELECT Date FROM availability ORDER BY Segment ASC" ) ;

    while( $row=mysql_fetch_array($list1))
    { $tarikh= $row["Date"];
    $option_block.="<option value=\"$tarikh\">$tarikh</option>";
    }

    <b>Select Date</b><select title="Date">
    <echo " $option_block "; ></select>

    ?>
    </p>

    </card>


    erm.....db tak kuar....mesej capaian gagal pun tak kuar...
    kat screen hs kosong jek....iskk....selagi saya tak lepas menda nih, screen seterusnya sume pun tak dapat setel.....
    iskkk......tolong saya...

    hopeless.....

  7. #7
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Hey,
    I rewrote what you were trying to do. You can view a sample at: http://wap.sufido.com/sunshine.php. This is just a simple PHP/WML script that reads from a database. The sorce code for that script is included below. It's nothing facy, but I hope this helps.


    The script:
    PHP Code:
    <?php
    header
    ('Content-type: text/vnd.wap.wml');
    echo 
    '<?xml version="1.0" encoding="iso-8859-1"?>' "\n";
    ?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card title="Sunshine WAP" newcontext="true">
    <p>
    <b>Select Date</b><select title="Date">
    <?
    $dbh
    =mysql_connect ("localhost""sufido_wap""***") or die ('Cannot connect because: ' mysql_error());
    mysql_select_db ("sufido_wap");

    $rQuery mysql_query("SELECT date FROM availability");
    while (
    $myrow mysql_fetch_array($rQuery)) {
    ?>
    <option><? echo $myrow['date'?></option>
    <? ?>
    </select>
    </p>
    </card>
    </wml>
    The SQL for the DB:
    PHP Code:
    CREATE TABLE 'availability' ('id' mediumint(9NOT NULL auto_increment'date' date NOT NULL default '0000-00-00',
      
    PRIMARY KEY  (`id`)) TYPE=MyISAM AUTO_INCREMENT=;

    INSERT INTO `availabilityVALUES (1'2003-09-03');
    INSERT INTO `availabilityVALUES (2'2003-09-04');
    INSERT INTO `availabilityVALUES (3'2003-09-05'); 

  8. #8
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Oh yeah, i forgot to say, i'v tested the above code with my WAP emulator (Deck-it) and my T600. It works perfectly on both.

  9. #9
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    Smile maksih...

    maksih....

    tp saya ni budak baru belajar...

    kalau banyak tanya lagi takpe kerr??

    Q1 - perlu ke saya ubah apa2 configuration file kat Apache?
    Q2- err kat mana saya leh dapatkan emulator yg sama cam awk guna?

    skrg saya guna WAP IDE ericsson 3.2.1...


    TQ..


  10. #10
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    No problem, ask as much as you want.

    First of all, you can get deck-it at http://www.pyweb.com/tools/

    Secondly, for your Apache, you shouldn't really need to configure anything, because we are manually outputing a header in the php file: header('Content-type: text/vnd.wap.wml');

    But, if you want it permenantly, create a mime type: 'text/vnd.wap.wml' for '.wml' files. (These are static wml pages)

    Try this:
    1) Open the file C:\Program Files\Apache Group\Apache\conf\httpd.conf into a text editor.

    2) In the file httpd.conf, search for "AddType" and add the following lines:

    AddType text/vnd.WAP.WML WML
    AddType text/vnd.WAP.WMLscript WMLs
    AddType image/vnd.WAP.WBMP WBMP
    AddType application/vnd.WAP.WMLc WMLc
    AddType application/vnd.WAP.WMLscriptc WMLsc
    Save httpd.conf.

    3) Stop and restart the Apache Web Server.

    -----

    What problem are you getting, are there any error messages? Does wml & php work in the first place? Test them out seperatly first to see if it's working.

  11. #11
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    error...

    sufyan,

    iskkk....
    saya tak tahu laa apa lagik masalah saya...
    saya dah run coding tuh tp still ader error....
    error message:

    "Device" tracing turned off
    "WAE" tracing turned off
    "Network" tracing turned off
    "Push" tracing turned off
    "Source" tracing turned off
    FileManager loading settings...
    Loading Bookmarks from: C:\Program Files\Ericsson\WapIDE 3.2.1\.\dat\bookmarks
    Searching for installed devices:
    Found device: com.ericsson.wap.browser.gui.device.R320s.Device
    Found device: com.ericsson.wap.browser.gui.device.R380s.Device
    Found device: com.ericsson.wap.browser.gui.device.R520m.Device
    Found device: com.ericsson.wap.browser.gui.device.R600.Device
    Found device: com.ericsson.wap.browser.gui.device.T39m.Device
    Found device: com.ericsson.wap.browser.gui.device.T60d.Device
    Found device: com.ericsson.wap.browser.gui.device.T65.Device
    Found device: com.ericsson.wap.browser.gui.device.T66.Device
    Found device: com.ericsson.wap.browser.gui.device.T68m.Device
    Push Inbox Disabled
    Loading device: T68m
    FileManager loading device settings for T68m
    [C-Log] PUSH receiver thread started
    [C-Log] Processing local file: C:/Program Files/Ericsson/WapIDE 3.2.1/./samples/welcome.wmlc
    [C-Log] Processing local file: C:/Program Files/Ericsson/WapIDE 3.2.1/samples/ericsson_logo.wbmp
    *** URL received: file://C:/apache/htdocs/sufyan2.wml
    [C-Log] Processing local file: C:/apache/htdocs/sufyan2.wml
    [C-Log] New ref. directory for file:// access is C:/apache/htdocs/
    [C-Log] document start expected (before or at line: 11)


    Error 68: HTTPFileNotFound



    apsal sufyan?erm....saya lak dah cuba dw emulator tuhh tp dia require file TCL82.dll....apa ek file ni?

    iskk.....sadis nyerr.....
    tolong.....

  12. #12
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Hmm... these errors are your WAP emulator errors.

    Just a question, does: http://wap.sufido.com/sunshine.php work on your emulator?

    TCL82.dll is a TCL shared library for windows, it comes with deck-it. Just copy all the .dll files to your windows system folder.

  13. #13
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0

    yg dulu dah jadik.....yg skrg lak....isk

    saya dah test dah ngan Deck It tuhh....coding yg awk kasik tu ok.....jalan jek,....
    tp sufyan, napa lak bila saya combinekan utk buat 2 listbox tuh dah error lak ekk.....

    ERROR : HTTP 500 , SERVER INTERNAL ERROR

    erm.....nih coding nyer....

    <card id="third" title="Check For Availability">

    <p><b>Select Date</b><select title="Date">

    <?php
    $dbh=mysql_connect ("localhost", "", "") or die ('Cannot connect because: ' . mysql_error());
    mysql_select_db ("WAP",$dbh);

    $rQuery = mysql_query("SELECT date FROM availability");
    while ($myrow = mysql_fetch_array($rQuery)) {
    ?>
    <option><? echo $myrow['date'] ?></option>
    <? } ?>
    </select>
    </p>

    <p><b>Select Time</b><select title="Time">

    <?php
    $dbh=mysql_connect ("localhost", "", "") or die ('Cannot connect because: ' . mysql_error());
    mysql_select_db ("WAP",$dbh);

    $rQuery = mysql_query("SELECT time FROM availability");
    while ($myrow = mysql_fetch_array($rQuery)) {
    ?>
    <option><? echo $myrow['time'] ?></option>
    <? } ?>
    </select>
    </p>


    </card>


    pastu....saya cuba lak try camnie,,,,,


    <card id="third" title="Check For Availability">

    <p><b>Select Date</b><select title="Date">
    <p><b>Select Time</b><select title="Time">

    <?php
    $dbh=mysql_connect ("localhost", "", "") or die ('Cannot connect because: ' . mysql_error());
    mysql_select_db ("WAP",$dbh);

    $rQuery = mysql_query("SELECT date,time FROM availability");

    while ($myrow = mysql_fetch_array($rQuery)) {
    ?>
    <option><? echo $myrow['date'] ?></option>
    <option><? echo $myrow['time'] ?></option>
    <? } ?>
    </select> </p>
    </select> </p>
    </select> </p>


    <p align="center"><br/><br/><a href="#fourth"> [ Go ] </a>
    <a href="exit.wml#exit">[ Exit ]</a>
    </p>

    </card>



    tp dua2 pun error......napa ekk......
    iskk....bantuan needed.... roger roger....
    mayday mayday.....


  14. #14
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    226
    Cuba:
    PHP Code:
    <card id="third" title="Check For Availability">

    <p><b>Select Date</b><select title="Date">

    <?php
    $dbh
    =mysql_connect ("localhost""""") or die ('Cannot connect because: ' mysql_error());
    mysql_select_db ("WAP",$dbh);

    $rQuery mysql_query("SELECT date FROM availability");
    while (
    $myrow mysql_fetch_array($rQuery)) {
    ?>
    <option><? echo $myrow['date'?></option>
    <? ?>
    </select>
    </p> 

    <p><b>Select Time</b><select title="Time">

    <?php
    $rQuery2 
    mysql_query("SELECT time FROM availability");
    while (
    $myrow2 mysql_fetch_array($rQuery2)) {
    ?>
    <option><? echo $myrow2['time'?></option>
    <? ?>
    </select>
    </p> 


    </card>

  15. #15
    Join Date
    Sep 2003
    Location
    KL
    Posts
    14
    Rep Power
    0
    coding ni pun takleh guna gak. error msg yg sama
    HTTP ERROR 500 :
    SERVER INTERNAL ERROR...

    isk.kenapa nie sufyan?

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. php coding
    By liyana86 in forum E-Commerce
    Replies: 0
    Last Post: 11-09-2009, 12:54 PM
  2. hi Coder here! I need some coding help
    By calvynlee in forum Website Programming
    Replies: 17
    Last Post: 22-02-2008, 02:04 PM
  3. [need help] HTML coding..
    By [the][matrix] in forum Website Design
    Replies: 2
    Last Post: 30-05-2005, 12:56 AM
  4. php coding...???
    By safprin in forum Website Programming
    Replies: 34
    Last Post: 01-06-2004, 11:11 AM
  5. tlg!! php coding tuk bt chat
    By aarkus in forum Website Programming
    Replies: 0
    Last Post: 22-05-2003, 04:57 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