Mysql PHP and WML

D

Dom

Hi

How easy is it to create a WAP page that can access a Mysql database?
I have read various tutorials but keep getting error messages or parts
of the code when I try to use them in the WAP simulator.

Can anyone point me in the right direction or give me some simple
code?

Thanks.
 
G

Gerald Aichholzer

Dom said:
How easy is it to create a WAP page that can access a Mysql database?
I have read various tutorials but keep getting error messages or parts
of the code when I try to use them in the WAP simulator.

Can anyone point me in the right direction or give me some simple
code?

Hi Dom,

I think that you're posting your problem in the wrong newsgroup.
This is about XML, XSLT and related stuff and has nothing to do
with mysql, PHP or WML (ok, maybe a little bit WML ;-).

Have a look at this page: http://www.zend.com/zend/tut/wap.php

If it doesn't help try using a search engine of your choice
(e.g. http://www.google.com) and look for the keywords PHP and
WML.

HTH,
Gerald
 
A

Andy Dingley

How easy is it to create a WAP page that can access a Mysql database?

WAP / WML can't access MySQL directly.

What you need is a PHP page (or some other scripting platform). This
can access MySQL by a well-trodden route and it then generates some
content, however you want it. Most examples you see will be for HTML,
but generating WML can be very similar.

You _will_ need to learn to read and write WML manually, with some
level of accuracy. There's no Frontpage or Dreamweaver to help you
here.

WML is an XML dialect and HTML isn't. So while HTML is usually
generated by a bunch of print statements, you might find it useful to
generate WML by using an XML DOM, then writing all of its contents in
one go. Without knowing exactly what you're doing, it's hard to say
which is better for you.

WML and especially WAP are obsolete. Most phone work nowadays is done
with XHTML-MP instead. As a first approximation, WAP/WML is just so
rubbish that you can't do anything useful with it. Anything complex
enough to be interesting needs the extra features of XHTML instead.
WML basically sucks dead bunnies.

Another authoring platform, if you're dealing with Vodafone Live!, is
PartnerML. This is an imtermediate format that the network stack turns
into either WML or XHTML, depending on the type of handset.
I have read various tutorials but keep getting error messages or parts
of the code when I try to use them in the WAP simulator.

Don't debug page generation code with WAP emulators - that's a
_really_ hard way to work. You'll never be sure if your WML is bogus,
or if your PHP is mis-generating it.

Split the problem into two steps, which you'll switch between
regularly. Write WML pages as static files using an editor. Debug
these with the WAP emulator and fix the WML coding glitches.

Write your PHP separately, and store its output as files (you might be
able to view it with IE, connected directly to your server). Debug
this by eyeballing the stored WML in comparison with the hand-authored
WML you've already debugged.

Last time I wrote any PartnerML, the OpenWave emulator we were using
was such rubbish (unreliable and inaccurate) that I wrote an
XSLT-based PartnerML ->HTML translator and used that from with a copy
of IE. An uphill fight, but it was better than Openwave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top