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:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old January 8th, 2005, 12:23 PM
gottaged gottaged is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: BKK
Posts: 1 gottaged User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 18 sec
Reputation Power: 0
Send a message via MSN to gottaged
XHTML in WML

well this is my first time to post here..
I have some question that
1.Can I use XHTML in code WML ?
2.I just created my wap site and have some prob about sending variable that when I use emulator to connect to wap they display <anchor> link but when I use my mobile It doesn't work It's display "Request failed" so I change Some of my code to element do type = accept but It's doesn't work with nokia why?
example code
PHP Code:
echo "<?xml version=\"1.0\"?>\n";
      echo 
"<!DOCTYPE wml PUBLIC  \"-//WAPFORUM//DTD WML 1.1//EN\"  \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
  
?>
  <wml>
<card id="north" title="NORTHERN LINE"  newcontext = "true">
<p align = "center">
                <img src="images/rail.gif" alt="logo"/><br/>
            </p>
<p align="left">
    Please select data from the list below to obtain  information <br/>
    
    <?
    $host 
"localhost";
    
$data "ged511";
    
$username ="root";
    
$password ="";

    
$sql1 "SELECT  station.station_name  FROM  station  where station.station_id  BETWEEN 1 AND 18 order by station_name ";
    
$sql2 "SELECT  station.station_name  FROM  station  where station.station_id  BETWEEN 1 AND 18  order by station_name ";

     
mysql_connect($host,$username,$password) or die("can not connect to DB ");
     
mysql_select_db("$data") or die("can not connect");
       
     
$result1 mysql_db_query($data,$sql1);  
     
$number1 mysql_num_rows($result1);
    
      
      
$result2 mysql_db_query($data,$sql2);  
     
$number2 mysql_num_rows($result2);

       echo 
"<b>From : </b><br/>";
       echo (
"<select  name='routefrom'>");

      if (
$number1 == 0)
          {        echo 
"No matchs to view.";
         }
    else
        {
             while(
$row1=mysql_fetch_array($result1))
        {
                  
$from $row1["station_name"];
                  echo (
"<option value= '$from'>$from</option>");
                       
        }
    }
           echo (
"</select>");

    
echo 
"<b>TO : </b><br/>";
echo (
"<select  name='routeto'>");

      if (
$number2 == 0)
          {        echo 
"No matchs to view.";
          }
    else
        {
             while(
$row2=mysql_fetch_array($result2))
        {          
                  
$to     $row2["station_name"];
                  echo (
"<option value= '$to'>$to</option>");     
        }
    }
     echo (
"</select>");


$sql3 "select distinct bogy_date from reservation  order by bogy_date";
 
$result3 mysql_db_query($data,$sql3);  
 
$number3 mysql_num_rows($result3);
echo 
"<b>Departure date : </b><br/>";
       echo (
"<select  name='day'>");
            
      if (
$number3 == 0)
          {        echo 
"No matchs to view.";
         }
    else
        {
             while(
$row3=mysql_fetch_array($result3))
        {
                  
$day $row3["bogy_date"];
                  
substr($day,1,4)
             
$convertedDate date("d/m/Y"strtotime($day));
                  echo (
"<option value= '$day'>$convertedDate</option>");
                       
        }
    }
          echo (
"</select>");


mysql_close();

  
?>
<b>Time :</b>
<select name = "time">
    <option value ="00:00:00">Early Morning(12PM-6AM)</option>
    <option value ="06:00:00"> Morning (6AM-12AM)</option>
    <option value ="12:00:00">Afternoon (12AM-6PM)</option>
    <option value ="18:00:00">Evening (6PM-12PM)</option>
</select>
</p>


<anchor>
<img src="images/next.gif" alt="NEXT"/>
<go method="post" href="book2.php3">
        <postfield name = "routefrom"  value = "$routefrom"/>
      <postfield name = "routeto" value = "$routeto"/>
     <postfield name = "time" value = "$time"/>
     <postfield name = "day" value = " '2005'.'-'.'$month'.'-'.'$d'"/>
        </go>
   </anchor>




     <anchor><img src="images/back.gif" alt="BACK"/>
        <go href ="book.wml#card1">
        </go>
</anchor>


    

</card>
</wml> 


change to dotype

PHP Code:
<do type="accept">
   <
go href="book2.php3" method="post">
      <
postfield name="routefrom" value="$routefrom" />
        <
postfield name "routeto" value "$routeto"/>
        <
postfield name "time" value "$time"/>
         <
postfield name "day" value "$day"/>
</
go>
</do> 

Because I want to adapt by wapsite that i use wml and php..

<sorry for bad sentence . I raely to speak English>

Reply With Quote
  #2  
Old January 14th, 2005, 08:35 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,670 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 6 h 10 m 50 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
You can use XHTML for MP or WML, not combine them both
__________________
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
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > XHTML 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 4 hosted by Hostway