473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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($land,$mcc,$opco,$iru,$cc) {

print 'Staat: <select name="state">
<option value="AP">Andhra Pradesh</option>
<option value="AR">Arunachal Pradesh</option>
<option value="AS">Assam</option>
<option value="BH">Bihar</option>
<option value="CH">Chennai/Madras</option>
<option value="CG">Chatisgargh</option>
<option value="DE">Dehli</option>
<option value="MA">Goa</option>
<option value="GU">Gujarat</option>
<option value="HA">Haryana</option>
<option value="HI">Himachal Pradesh</option>
<option value="JA">Jammu / Kashmir</option>
<option value="JH">Jharkland</option>
<option value="KA">Karnataka</option>
<option value="KE">Kerala</option>
<option value="KO">Kolkata/Calcutta</option>
<option value="MP">Madhya Pradesh</option>
<option value="MA">Maharashtra</option>
<option value="MN">Manipur</option>
<option value="ME">Meghalaya</option>
<option value="MB">Mumbai/Bombay</option>
<option value="NA">Nagaland</option>
<option value="NI">Nizoram</option>
<option value="OR">Orissa</option>
<option value="PO">Pondicherry</option>
<option value="PU">Punjab</option>
<option value="RA">Rajasthan</option>
<option value="TN">Tamil Nadu</option>
<option value="TR">Tripura</option>
<option value="UE">Uttar Pradesh East</option>
<option value="UW">Uttar Pradesh West</option>
<option value="UT">Uttaranchal</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>';

}
Jul 17 '05 #1
6 4931

"uitbundig" <ri******@vodafone.nl> wrote in message
news:bv**********@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 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)

Jul 17 '05 #2
On 2004-01-30, Gerard van Wilgen <gv********@planet.nl> wrote:

"uitbundig" <ri******@vodafone.nl> wrote in message
news:bv**********@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 not an
PHP-problem but an HTML-problem.


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
Jul 17 '05 #3
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">Andhra Pradesh</option>
<option value="WB">West Bengal</option>
</select>';

print '
<anchor>Accoord
<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" <eu**@pi.be> wrote in message
news:bv************@ID-188825.news.uni-berlin.de...
On 2004-01-30, Gerard van Wilgen <gv********@planet.nl> wrote:

"uitbundig" <ri******@vodafone.nl> wrote in message
news:bv**********@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 not an PHP-problem but an HTML-problem.


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

Jul 17 '05 #4
uitbundig <ri******@vodafone.nl> wrote:

First: please don't TOFU.
print ' .... <postfield name="id" value="$id"/>
<postfield name="state" value="$state"/> .... </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'.


Read up on strings and the expansion of variables:
http://www.php.net/manual/en/language.types.string.php

--

Daniel Tryba

Jul 17 '05 #5
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" <ri******@vodafone.nl> wrote in message
news:bv**********@news2.tilbu1.nb.home.nl...
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">Andhra Pradesh</option>
<option value="WB">West Bengal</option>
</select>';

print '
<anchor>Accoord
<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" <eu**@pi.be> wrote in message
news:bv************@ID-188825.news.uni-berlin.de...
On 2004-01-30, Gerard van Wilgen <gv********@planet.nl> wrote:

"uitbundig" <ri******@vodafone.nl> wrote in message
news:bv**********@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
not
an PHP-problem but an HTML-problem.


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


Jul 17 '05 #6
uitbundig <ri******@vodafone.nl> wrote:
Daniel, what is TOFU?
$ 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 (telecommunication-slang, Usenet)

Guess which one I mean :). Why? http://www.leerquoten.nl/ (in dutch)
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.


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

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: HH | last post by:
I'm learning to design web applications with php, mysql, and apache from a book. I copied a sample application called guestbook 2000 that came with the CD in the book to my htdocs folder, but...
5
by: vishal | last post by:
when a user clicks on a hyperlink i want to pass data to linked page. but what i want is that this data should not be visible to user. i mean is there any way that i can pass data except get method...
6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
2
by: Matt | last post by:
How to pass data back and forth between ASP and JSP page? Let's say I have Java objects, how to pass the data back to ASP page?? Or ASP has data, how to pass the data to JSP page?? Please...
2
by: Serge Myrand | last post by:
Hi, I am new to ASP and I cannot figure out how to pass variable content in ASP. How to pass the variable sClientNo in the following redirect. ...
10
by: EOZyo | last post by:
Hi, i'm trying to set pagination for a search i run on my website, i'll try to explain the easiest i can: When i click the search button on search.php, data is received and stored in variables...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
7
by: Gladen Blackshield | last post by:
Hello All! Still very new to PHP and I was wondering about the easiest and simplest way to go about doing something for a project I am working on. I would simply like advice on what I'm asking...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.