WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 31st, 2006, 06:46 AM
amarvora's Avatar
amarvora amarvora is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Inida - Gujarat - Rajkot
Posts: 389 amarvora Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 2 Days 16 h 21 m 21 sec
Reputation Power: 0
Send a message via AIM to amarvora Send a message via MSN to amarvora Send a message via Yahoo to amarvora
Question Need WML PHP Variable help

Hello friend

I want to pass ($wml) variable to php so how to do that ? I will be thankful for you..

Here is my WML file
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">

<wml>
	<card id="tutorial_tc" title="WML Tutorial">
		<p>You have selected: $Make</p><br/>
		<p>
			<select name="Make">
				<option value="Make" onpick="#tutorial_tc">Make</option>
				<option value="Audi" onpick="#tutorial_tc">Audi</option>
				<option value="BMW" onpick="#tutorial_tc">BMW</option>
			</select><br/>
		</p>
	</card>
</wml>

So here I am getting values in $Make.. now How can i pass this value in PHP ? any idea..

Reply With Quote
  #2  
Old July 31st, 2006, 02:03 PM
vrspectre's Avatar
vrspectre vrspectre is offline
I see semi-colons
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Portland, OR
Posts: 297 vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 10 h 38 m 59 sec
Reputation Power: 16
Send a message via AIM to vrspectre Send a message via Yahoo to vrspectre
Quote:
Originally Posted by amarvora
So here I am getting values in $Make.. now How can i pass this value in PHP ? any idea..


PHP Code:
<p>You have selected: <?php echo $Make;?></p> 


Will put the value of $Make in the wml that is sent to the browser. If you need the use the variable inside WML you could do this:

PHP Code:
<?php echo "\$Make=".$Make;?>


It's been a while since I've needed to do that but it's either \$Make or $$Make
__________________


Reply With Quote
  #3  
Old July 31st, 2006, 07:18 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,660 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 1 h 21 m 33 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Try adding the following into your script - see what PHP thinks any form values are
php Code:
Original - php Code
  1. <p>
  2. <?php
  3. print_r($_REQUEST);
  4. ?>
  5. </p>
__________________
Cheers,

Jamie


# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

# Any form of employment is strictly prohibited ......


__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.

__________________

Reply With Quote
  #4  
Old August 1st, 2006, 07:28 AM
amarvora's Avatar
amarvora amarvora is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Inida - Gujarat - Rajkot
Posts: 389 amarvora Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 2 Days 16 h 21 m 21 sec
Reputation Power: 0
Send a message via AIM to amarvora Send a message via MSN to amarvora Send a message via Yahoo to amarvora
Question

Another problem is facing now.. I think above code is proper But then also now i m not get values in $Make (in WML Variable) I don't whats wrong in this ?

Reply With Quote
  #5  
Old August 1st, 2006, 07:53 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,660 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 1 h 21 m 33 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
I can't test this on a phone right now, so I can't really help,
I can only give you my experience.

I tend to avoid WML variables.
I try to get everything from PHP - this may not be the best solution, but it works for me.
As WML script, I assume that you are sort of using that - is a javascript derivative it is client side -> therefore PHP isn't the solution.

Reply With Quote
  #6  
Old August 1st, 2006, 11:52 PM
amarvora's Avatar
amarvora amarvora is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Inida - Gujarat - Rajkot
Posts: 389 amarvora Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 2 Days 16 h 21 m 21 sec
Reputation Power: 0
Send a message via AIM to amarvora Send a message via MSN to amarvora Send a message via Yahoo to amarvora
I didn't getting idea what to do now? because even simple WML file is also not woking..

for example I have below WML file. But in emulator Select menu is not working.. I didn't found what is wrong with it.

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 
		  "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
	<card id="card1" title="OnPick Example">
		<p>
			<select name="select">
				<option value="test1">Test1</option>
				<option value="test2">Test2</option>
				<option value="test3">Test3</option>
			</select>
		</p>
	</card>
</wml>

Reply With Quote
  #7  
Old August 2nd, 2006, 10:54 AM
vrspectre's Avatar
vrspectre vrspectre is offline
I see semi-colons
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Portland, OR
Posts: 297 vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 10 h 38 m 59 sec
Reputation Power: 16
Send a message via AIM to vrspectre Send a message via Yahoo to vrspectre
I just tried it using the WML plugin for firefox and it works fine.

I would suspect something wrong with your emulator or server.

What's the error you get?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > Need WML PHP Variable help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway