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.