Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile 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:
  #1  
Old December 29th, 2005, 01:13 AM
utsboy utsboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Jakarta
Posts: 16 utsboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 22 m 26 sec
Reputation Power: 0
Send a message via Yahoo to utsboy
Question How to implement session in wml..??

Hi Guys,
Could anyone help me how to write session in WML using PHP embedded please.
Its been few weeks since Im trying to find a way to write it but still nothing in result..
I would very appreciate it..

Best Regards,
Utsboy

Reply With Quote
  #2  
Old December 29th, 2005, 07:07 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Click here for more information.
 
Join Date: Feb 2002
Location: Finland
Posts: 8,914 jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st Grade (Above 100000 Reputation Level)jabba_29 User rank is General 11st 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 4 Weeks 1 Day 13 h 45 m 8 sec
Reputation Power: 1693
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
Can you do it with PHP and normal html? Essentially it is the same thing. The main thing is that you need to make sure that the phone accepts the cookie, so perhaps writing the session in the url is the safest way. Also, bearing that in mind, you need to ensure that the ampersand is writen out in full or the page will break. eg: &_amp; without the _ is required.
Post some code of what you have already.
__________________
Cheers,

Jamie

# mdb4u | mobile movie database] | Please help to test and promote
# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

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
  #3  
Old December 29th, 2005, 10:09 PM
utsboy utsboy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Jakarta
Posts: 16 utsboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 22 m 26 sec
Reputation Power: 0
Send a message via Yahoo to utsboy
Lightbulb Have just Found out...

Quote:
Originally Posted by jabba_29
Can you do it with PHP and normal html? Essentially it is the same thing. The main thing is that you need to make sure that the phone accepts the cookie, so perhaps writing the session in the url is the safest way. Also, bearing that in mind, you need to ensure that the ampersand is writen out in full or the page will break. eg: &_amp; without the _ is required.
Post some code of what you have already.

Hello Jabba,
Thx for the immediate response, Iam very appreciate it .
Btw, I've just found out the solution and these are the trial scripts which success below :
cre_sesi.php ->
PHP Code:
<?session_register("var_x");?>
<?session_register("var_x");?>
<?php
header
("Content-type: text/vnd.wap.wml");
header("Pragma: no-cache");
echo 
"<?xml version=\"1.0\"?>";
echo 
"<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
   
" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

<wml>
    <card id="Session" title="Session Trial">
        <p>
<?
$var_x 
"123456";
print (
"Session : " session_id() . "<br/>");
print (
"Inside session : $var_x");

$link "<a href=\"ba_sesi.php\"><Read Session></a>";
echo 
$link;
?>
              </p>
        </card>
</wml>



ba_sesi.php->
PHP Code:
<?session_start();?>
<?session_start();?>
<?php
header
("Content-type: text/vnd.wap.wml");
header("Pragma: no-cache");
echo 
"<?xml version=\"1.0\"?>";
echo 
"<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
   
" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

<wml>
    <card id="Read" title="Read Sesion">
        <p>
<?
$var_x 
$_SESSION["var_x"];
print (
"SID : " session_id() . "<br/>");
print (
"Values : $var_x");
?>
              </p>
        </card>
</wml>




Regards,
Utsboy

Last edited by jabba_29 : December 30th, 2005 at 05:09 AM. Reason: Changed PHPNET tags to PHP tags :)

Reply With Quote
  #4  
Old October 28th, 2006, 11:12 AM
sugiarto sugiarto is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 1 sugiarto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 9 sec
Reputation Power: 0
how to use session from jsp into wml

Hi Guys,
Could anyone help me how to write session in WML using jsp embedded please.
Its been few weeks since Im trying to find a way to write it but still nothing in result..
I would very appreciate it..

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > How to implement session in wml..??


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 5 hosted by Hostway
Stay green...Green IT