|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
Getting Php To Work On Wap Phone..please Help
HI, I have developed a simple wml page that pulls information from a sql database. The end user enters a reference number and all information stored relating to this reference should be displayed. THE FOLLOWING CODE WORKS ON SOME WAP EMULATORS BUT NOT ON PHONES...PLEASE HELP!!
HERE IS THE WML 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="info 1" title="MyiNFO"> <p> <anchor title="Getinfo">infoplease <go method="post" href="http://www.example.com/htdocs/example.php"> <postfield name="ref" value="$(mine)"/> </go> </anchor> refnoNo: <input title="m" name="mine"/> <br/> </p> </card> </wml> THE ABOVE LOADS FINE!! BUT THE EXAMPLE.PHP FILE DOES NOT LOAD HERE IS THE CODE FOR example.php, this page should display the results of the above query based on the $mine variable. HERE GOES: <?php header("Content-type: text/vnd.wap.wml"); print ("<? xml version=\'1.0'\ encoding='iso-8859-1'?>"); print ("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n"); print ("<wml>\n"); print ("<card id=\"sent\" title=\"Mail sent\">\n"); $db = mysql_connect("localhost","cazino5",""); mysql_select_db("cazino5_uk_db",$db); $query = "SELECT * FROM memtest WHERE email=".$mine; $result = mysql_query ($query,$db); $nrows = mysql_num_rows($result); for ($i=0; $i < $nrows; $i++) { $row = mysql_fetch_array($result); print "<p>$row[email] <br/> $row[message] </p>"; } mysql_free_result($result); print ("</card>\n"); print ("</wml>\n"); ?> WHEN I POST TO THE ABOVE CODE NO RESULTS ARE DIPLAYED AND I GET DISPLAY ERROR MESSAGES. NOTE:I have set my hosting server with the right php and wml mime types. Any help on this would be much appreciated. |
|
#2
|
||||
|
||||
|
Change
PHP Code:
PHP Code:
PHP Code:
What errors do you get? Have you tried validating the code a w3c?
__________________
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. __________________ |
|
#3
|
|||
|
|||
|
THANKYOU still does not work!!
Hi thankyou for your quick response. I made the ammendments to my code as you suggested however, it still does not work. The errors im getting are different on each phone for example "seimens=unable to display page" "nokia= ERROR unable to load item requested".
I have tried it w3c however it comes up with first line errors due to the open php tag (<?php) syntax. w3c only tends to work with wml or xml headers. Im using a remote lycos server and I have created and modified the .htaccess file with the following wap mime types: AddType application/x-httpd-php .php4 .php .wml AddType text/vnd.wap.wml wml AddType application/vnd.wap.wmlc wmlc AddType text/vnd.wap.wmlscript wmls AddType text/vnd.wap.wmlscript wmlsc AddType application/vnd.wap.sic sic AddType text/vnd.wap.si si AddType text/vnd.wap.sl sl However the page is still not loading. im getting 'XML not well formed errors on line 9 column 1' any futher help would be very much appreciated. |
|
#4
|
|||
|
|||
|
Re Getting Php To Work (problem For Everyone It Seems!!)
Hi Just Wondered If Anyone Had A Universal Solution To This Problem Of Getting Php To Work With Wap. Looking Through This Forum It Seems A Lot Of People Have The Same Problem. We Have All Set The Correct Mime Types And Used The Correct Headers And It Still Seems None Of Us Can Get Php To Work On A Wap Enabled Handset. If Somebody Knows Ho To Do This Please Help.
|
|
#5
|
|||
|
|||
|
Quote:
I use a php script to display local theater movie showtimes on my WAP site without any problems... I am currently developing a php script to power a yellow page type database (mysql) search app. WML has always been unforgiving and incorporating php (also unforgiving) it makes it can be a bit of a task...but it is workable... [another topic] I am having problems with links displaying on "smart phone" emulators... my code displays fine on wap 1.x phones and emulators but I can't get hyperlinks to display on wap 2.0 phones...? what type of error messages are you getting? |
|
#6
|
||||
|
||||
|
I haven't had to do anything on any of my servers to get wap running.
Things to note, do Lycos add stuff to their pages, like adverts etc - this might be causing a problem. Also; try this is your header PHP Code:
|
|
#7
|
||||
|
||||
|
Yes I think Lycos and most free hosts add headers and footers to files for their own popups, banners and so on.
__________________
Andy Moore << oh no it's got a blog..... Word Press WAP Plugin with Ad Mob Advertising revenue PHP developer deploying ringtones, mp3 downloads and realtones I'm a geek who's obsessed with stats and gadgets |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > Getting Php To Work On Wap Phone..please Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|