×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    Tampere Finland
    Posts
    76

    How to get the data from an HTML Form

    Hi All,

    My requirement is to display a HTML form and to get back the data input from user and store it to file.

    Can anyone please tell me how to get data from the HTML page. Say page has 2-3 Text Boxes one radio button group and other functionalities of HTML form.

    I am very new to HTML and Browser of Symbian. I am displaying HTML by CBrCtlInterface. If there is some better way to do it please let me know.

    I am using S60 3rd Edition.

    Thanks a ton in advance.


    Cheers,
    Adi

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Tampere Finland
    Posts
    76

    Re: How to get the data from an HTML Form

    Please help if someone have a clue.

    I am still stuck with it.


    Cheers,
    Adi

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    Re: How to get the data from an HTML Form

    Quote Originally Posted by aditya4180 View Post
    Hi All,

    My requirement is to display a HTML form and to get back the data input from user and store it to file.

    Can anyone please tell me how to get data from the HTML page. Say page has 2-3 Text Boxes one radio button group and other functionalities of HTML form.

    I am very new to HTML and Browser of Symbian. I am displaying HTML by CBrCtlInterface. If there is some better way to do it please let me know.

    I am using S60 3rd Edition.

    Thanks a ton in advance.


    Cheers,
    Adi
    if you means how to store data on server you need to use one dynamic web language like php or asp


    for example a php code to get data like this
    <html>
    <head>

    <title>调查表</title>

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>

    <body bgcolor="#FFFFFF">

    <?php

    function display_form() {

    global $PHP_SELF;

    ?>

    <FORM action="<?php
    echo $PHP_SELF;
    ?>" METHOD=post>名字: <INPUT TYPE=TEXT
    NAME="name"><BR>

    单项选择: <INPUT TYPE=RADIO NAME="first" VALUE="我很笨">我很笨 <INPUT TYPE=RADIO
    NAME="first" VALUE="我非常笨">我非常笨 <INPUT TYPE=RADIO NAME="first"
    VALUE="我简直就是个傻冒"> 我简直就是个傻冒 <br>

    多项选择: <INPUT TYPE=CHECKBOX NAME="second[]" VALUE="我喜欢打蓝球">我喜欢打蓝球 <INPUT
    TYPE=CHECKBOX NAME="second[]" VALUE="我喜欢游泳">我喜欢游泳 <INPUT TYPE=CHECKBOX
    NAME="second[]" VALUE="我喜欢跳舞">我喜欢跳舞 <INPUT TYPE=CHECKBOX
    NAME="second[]" VALUE="我喜欢爬山">我喜欢爬山 <INPUT TYPE=HIDDEN NAME="stage"
    VALUE="results">
    <p><INPUT TYPE=SUBMIT VALUE="谢谢"></p>

    </FORM>

    <?php

    }

    ?>

    //程序开始

    <?php

    function process_form()

    {

    global $name;

    global $first;

    global $second;

    if ($first == '我很笨') {
    $first_message = '你不笨。';
    }

    elseif ($first == '我非常笨') {
    $first_message = '你很聪明。';
    }

    else {
    $first_message = '你简直就象是一个聪明的人了。';
    }

    $favorite_second = count ( $second );

    if ($favorite_second <= 1)

    {
    $second_message = '但你很快就会在动物园里死去,忏悔吧!';
    }

    elseif ($favorite_second > 1 && $favorite_second < 4)

    {
    $second_message = '你是只爱运动的的猩猩。';
    }

    else {
    $second_message = '你运动的太多了,对猩猩来讲已经过量,你准备棺材吧,:(';
    }

    echo "这是一项针对猩猩的测试:<br><br>";

    echo "你好! 你的名字叫:$name. <br><br>";

    echo "你的测验结果是。。。。。$first_message $second_message";

    }

    ?>

    <?php

    if (empty ( $stage )) {
    display_form ();
    }

    else {
    process_form ();
    }

    ?>

    </body>

    </html>

Similar Threads

  1. GPS positioning data to form
    By tprami in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2004-08-25, 06:58
  2. Problems with client/server data transfer
    By wilse in forum Symbian C++
    Replies: 1
    Last Post: 2004-08-03, 16:14
  3. how can i get data from form?
    By morcho in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-22, 09:13
  4. Resubmiting Form Data.
    By corby10 in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2003-05-27, 10:40
  5. Unicode Song Title In NSM Ringtone
    By mcai7db3 in forum Smart Messaging
    Replies: 3
    Last Post: 2002-08-28, 06:58

Posting Permissions

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