Postfield in WML does not pass all variables to next WML page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • uitbundig

    #1

    Postfield in WML does not pass all variables to next WML page

    I am writing a function as listed below. My problem is that this form passes
    only the variable 'state' and not the others.
    Can somebody help me?

    Thanks,

    Gustaaf


    function SelectIndia($la nd,$mcc,$opco,$ iru,$cc) {

    print 'Staat: <select name="state">
    <option value="AP">Andh ra Pradesh</option>
    <option value="AR">Arun achal Pradesh</option>
    <option value="AS">Assa m</option>
    <option value="BH">Biha r</option>
    <option value="CH">Chen nai/Madras</option>
    <option value="CG">Chat isgargh</option>
    <option value="DE">Dehl i</option>
    <option value="MA">Goa</option>
    <option value="GU">Guja rat</option>
    <option value="HA">Hary ana</option>
    <option value="HI">Hima chal Pradesh</option>
    <option value="JA">Jamm u / Kashmir</option>
    <option value="JH">Jhar kland</option>
    <option value="KA">Karn ataka</option>
    <option value="KE">Kera la</option>
    <option value="KO">Kolk ata/Calcutta</option>
    <option value="MP">Madh ya Pradesh</option>
    <option value="MA">Maha rashtra</option>
    <option value="MN">Mani pur</option>
    <option value="ME">Megh alaya</option>
    <option value="MB">Mumb ai/Bombay</option>
    <option value="NA">Naga land</option>
    <option value="NI">Nizo ram</option>
    <option value="OR">Oris sa</option>
    <option value="PO">Pond icherry</option>
    <option value="PU">Punj ab</option>
    <option value="RA">Raja sthan</option>
    <option value="TN">Tami l Nadu</option>
    <option value="TR">Trip ura</option>
    <option value="UE">Utta r Pradesh East</option>
    <option value="UW">Utta r Pradesh West</option>
    <option value="UT">Utta ranchal</option>
    <option value="WB">West Bengal</option>
    </select>

    <br/>

    <anchor>
    Selecteer
    <go href="roamform. php" method="get">
    <postfield name="opco" value="$(opco)"/>
    <postfield name="type" value="2"/>
    <postfield name="state" value="$(state) "/>
    <postfield name="lnd" value="$(land)"/>
    <postfield name="iru" value="$(iru)"/>
    <postfield name="cc" value="$(cc)"/>
    <postfield name="mcc" value="$mcc"/>
    </go>
    </anchor>';

    }


  • Gerard van Wilgen

    #2
    Re: Postfield in WML does not pass all variables to next WML page


    "uitbundig" <rijksweg@vodaf one.nl> wrote in message
    news:bveh61$jp0 $1@news1.tilbu1 .nb.home.nl...[color=blue]
    > I am writing a function as listed below. My problem is that this form[/color]
    passes[color=blue]
    > only the variable 'state' and not the others.[/color]

    There are no "anchor", "go" and "postfield" tags in HTML. So, it is not an
    PHP-problem but an HTML-problem.

    Gerard van Wilgen
    --
    www.majstro.com (On-line translation dictionary / Enreta tradukvortaro)
    www.travlang.com/Ergane (Free translation dictionary for Windows / Senpaga
    tradukvortaro por Windows)

    Comment

    • Tim Van Wassenhove

      #3
      Re: Postfield in WML does not pass all variables to next WML page

      On 2004-01-30, Gerard van Wilgen <gvanwilgen@pla net.nl> wrote:[color=blue]
      >
      > "uitbundig" <rijksweg@vodaf one.nl> wrote in message
      > news:bveh61$jp0 $1@news1.tilbu1 .nb.home.nl...[color=green]
      >> I am writing a function as listed below. My problem is that this form[/color]
      > passes[color=green]
      >> only the variable 'state' and not the others.[/color]
      >
      > There are no "anchor", "go" and "postfield" tags in HTML. So, it is not an
      > PHP-problem but an HTML-problem.[/color]

      Thats why the topic says: WML instead of HTML

      Anway, for the op: here is a working example



      --

      Comment

      • uitbundig

        #4
        Re: Postfield in WML does not pass all variables to next WML page

        Tim,

        I appreciate your help. I can see they use also php-variables in the
        postfield variable. Instead of using <anchor> ... </anchor> tags they use
        <do type...> ..... </do> tags.
        I have tried that code but the same problem stays. In my example the only
        variable which is filled is the variable from the <select><option ...> tags.
        Just a simple example php-code again:

        $id = 'abc';

        print '
        Staat:
        <select name="state">
        <option value="AP">Andh ra Pradesh</option>
        <option value="WB">West Bengal</option>
        </select>';

        print '
        <anchor>Accoo rd
        <go href="form.php" method="get">
        <postfield name="tp" value="m"/>
        <postfield name="id" value="$id"/>
        <postfield name="state" value="$state"/>
        </go>
        </anchor>';

        What you see in the get-string is: www.ditz.nl/form.php?tp=m&id=&state=AP

        You see that the variable 'tp' has the given value, that the variable 'id'
        is empty and that the variable 'state' has given the value from the 'option'
        tags. My problem is that the variable 'id' has no value although I have set
        this varible to the value 'abc'.

        Please your suggestions.

        Gustaaf



        "Tim Van Wassenhove" <euki@pi.be> wrote in message
        news:bvf80i$rqf 42$2@ID-188825.news.uni-berlin.de...[color=blue]
        > On 2004-01-30, Gerard van Wilgen <gvanwilgen@pla net.nl> wrote:[color=green]
        > >
        > > "uitbundig" <rijksweg@vodaf one.nl> wrote in message
        > > news:bveh61$jp0 $1@news1.tilbu1 .nb.home.nl...[color=darkred]
        > >> I am writing a function as listed below. My problem is that this form[/color]
        > > passes[color=darkred]
        > >> only the variable 'state' and not the others.[/color]
        > >
        > > There are no "anchor", "go" and "postfield" tags in HTML. So, it is not[/color][/color]
        an[color=blue][color=green]
        > > PHP-problem but an HTML-problem.[/color]
        >
        > Thats why the topic says: WML instead of HTML
        >
        > Anway, for the op: here is a working example
        > http://www.codehelp.co.uk/php/wap8.php
        >
        >
        > --
        > http://home.mysth.be/~timvw[/color]


        Comment

        • Daniel Tryba

          #5
          Re: Postfield in WML does not pass all variables to next WML page

          uitbundig <rijksweg@vodaf one.nl> wrote:

          First: please don't TOFU.
          [color=blue]
          > print '[/color]
          ....[color=blue]
          > <postfield name="id" value="$id"/>
          > <postfield name="state" value="$state"/>[/color]
          ....[color=blue]
          > </anchor>';
          >
          > You see that the variable 'tp' has the given value, that the variable 'id'
          > is empty and that the variable 'state' has given the value from the 'option'
          > tags. My problem is that the variable 'id' has no value although I have set
          > this varible to the value 'abc'.[/color]

          Read up on strings and the expansion of variables:


          --

          Daniel Tryba

          Comment

          • uitbundig

            #6
            Re: Postfield in WML does not pass all variables to next WML page

            Daniel, what is TOFU?

            Further I have solved the problem now.
            The solution is:

            Instead of
            print '<postfield name="id" value="$id"/>';
            you have to write
            print '<postfield name="id" value="'.$id.'"/>';

            This works fine.

            Thanks for your help.

            Gustaaf

            "uitbundig" <rijksweg@vodaf one.nl> wrote in message
            news:bvgcp2$267 $1@news2.tilbu1 .nb.home.nl...[color=blue]
            > Tim,
            >
            > I appreciate your help. I can see they use also php-variables in the
            > postfield variable. Instead of using <anchor> ... </anchor> tags they use
            > <do type...> ..... </do> tags.
            > I have tried that code but the same problem stays. In my example the only
            > variable which is filled is the variable from the <select><option ...>[/color]
            tags.[color=blue]
            > Just a simple example php-code again:
            >
            > $id = 'abc';
            >
            > print '
            > Staat:
            > <select name="state">
            > <option value="AP">Andh ra Pradesh</option>
            > <option value="WB">West Bengal</option>
            > </select>';
            >
            > print '
            > <anchor>Accoo rd
            > <go href="form.php" method="get">
            > <postfield name="tp" value="m"/>
            > <postfield name="id" value="$id"/>
            > <postfield name="state" value="$state"/>
            > </go>
            > </anchor>';
            >
            > What you see in the get-string is: www.ditz.nl/form.php?tp=m&id=&state=AP
            >
            > You see that the variable 'tp' has the given value, that the variable 'id'
            > is empty and that the variable 'state' has given the value from the[/color]
            'option'[color=blue]
            > tags. My problem is that the variable 'id' has no value although I have[/color]
            set[color=blue]
            > this varible to the value 'abc'.
            >
            > Please your suggestions.
            >
            > Gustaaf
            >
            >
            >
            > "Tim Van Wassenhove" <euki@pi.be> wrote in message
            > news:bvf80i$rqf 42$2@ID-188825.news.uni-berlin.de...[color=green]
            > > On 2004-01-30, Gerard van Wilgen <gvanwilgen@pla net.nl> wrote:[color=darkred]
            > > >
            > > > "uitbundig" <rijksweg@vodaf one.nl> wrote in message
            > > > news:bveh61$jp0 $1@news1.tilbu1 .nb.home.nl...
            > > >> I am writing a function as listed below. My problem is that this form
            > > > passes
            > > >> only the variable 'state' and not the others.
            > > >
            > > > There are no "anchor", "go" and "postfield" tags in HTML. So, it is[/color][/color][/color]
            not[color=blue]
            > an[color=green][color=darkred]
            > > > PHP-problem but an HTML-problem.[/color]
            > >
            > > Thats why the topic says: WML instead of HTML
            > >
            > > Anway, for the op: here is a working example
            > > http://www.codehelp.co.uk/php/wap8.php
            > >
            > >
            > > --
            > > http://home.mysth.be/~timvw[/color]
            >
            >[/color]


            Comment

            • Daniel Tryba

              #7
              Re: Postfield in WML does not pass all variables to next WML page

              uitbundig <rijksweg@vodaf one.nl> wrote:[color=blue]
              > Daniel, what is TOFU?[/color]

              $ dict tofu
              2 definitions found

              From WordNet (r) 2.0 [wn]:

              tofu
              n : cheeselike food made of curdled soybean milk [syn: {bean
              curd}]

              From Virtual Entity of Relevant Acronyms (Version 1.9, June 2002) [vera]:

              TOFU
              Text Oben, Full-quote Unten (telecommunicat ion-slang, Usenet)

              Guess which one I mean :). Why? http://www.leerquoten.nl/ (in dutch)
              [color=blue]
              > Further I have solved the problem now.
              > The solution is:
              >
              > Instead of
              > print '<postfield name="id" value="$id"/>';
              > you have to write
              > print '<postfield name="id" value="'.$id.'"/>';
              >
              > This works fine.[/color]

              Or one of the many other ways to generate strings, like :
              print "<postfield name='id' value='$id'/>";
              (unless WML dicates attributes to be in ")

              [snip 76 lines]
              --

              Daniel Tryba

              Comment

              Working...