GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-16-2003, 00:32   #1 (permalink)
Junior Member
 
Join Date: Dec 2003
Location: Turkey
Age: 44
Posts: 1
Member: 45974
Status: Offline
Thanks Meter: 0
what is the problem with my php&wml code?


hi everyone i wrote a code with using php and wml. İt is working in www.wapsilon.com's wap browser and my winwap browser but it isnt work in my ericsson r520m. Could you check my code if there is a mistake or something?

<?php
// send wml headers
header("Content-type: text/vnd.wap.wml");
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="card1" title="Poly Melodies">
<p>
<?php
//İnclude a page to connect database.
include("ekler/rd.php");
#Count melodies per cat
$yerlisorgu = mysql_query("select * from $tablo WHERE cid=15 and description='yerli'");
$yerlisayi=mysql_num_rows($yerlisorgu);
$yabancisorgu = mysql_query("select * from $tablo WHERE cid=15 and description='yabanci'");
$yabancisayi=mysql_num_rows($yabancisorgu);

$kat = $_GET["kat"];
if(!$kat) {
//if user doesnt choose a cat show cat page
echo("<a href=\"$melodiler?kat=yerli\">Türkçe Melodi</a> &nbsp;($yerlisayi) <br/>");
echo("<a href=\"$melodiler?kat=yabanci\">Yabanci Melodi</a> &nbsp;($yabancisayi)<br/>");
echo("<a href=\"arama.php\">Melodi Ara</a><br/>");
}
else{
$sayfa = $_GET["sayfa"];
if(!$sayfa) $sayfa =1;
$harfibas = $_GET["harfibas"];
if(!$harfibas){
# show record 9 per page
$kacharf = 9;
$toplam = mysql_num_rows(mysql_query("select harf from harf"));
$kacsayfa = $toplam / $kacharf;
$kactan = ($sayfa-1) * $kacharf;
$kayitlar = mysql_query("select * from harf limit $kactan, $kacharf");
#show letters
while($kayit = mysql_fetch_array($kayitlar)){
$harfsorgu = mysql_query("select * from $tablo WHERE cid=15 and description='$kat' and title like '$kayit[1]%'");
$harfsayi=mysql_num_rows($harfsorgu);
echo ("<br/><a href=\"$melodiler?kat=$kat&sayfa=$sayfa&harfibas=$ kayit[1]\">$kayit[1]&nbsp;($harfsayi)</a>");
}
# write bottom links.
echo ("<br/><br/>");
linkp ("$melodiler?kat=$kat&sayfa=1","A-I");
linkp ("$melodiler?kat=$kat&sayfa=2","J-S");
linkp ("$melodiler?kat=$kat&sayfa=3","T-Z");
}
else{
#show melodies which starts $harfibas
$harfkayitlar = mysql_query("select * from $tablo WHERE cid=15 and description='$kat' and title like '$harfibas%'");
#check query
if (@mysql_num_rows($harfkayitlar) > 0) {
$i=1;
while($harfkayit = mysql_fetch_array($harfkayitlar)){
$harfkayit[3]=strtolower($harfkayit[3]);
echo ("$i.<a href=\"$harfkayit[4]\">$harfkayit[3]</a><br/>");
$i++;
}
}
else
{
#write error message
echo("Bu harfle başlayan melodi bulunmuyor.");
}
# write bottom links.
echo ("<br/>");
linkp ("$melodiler?kat=$kat&sayfa=1","A-I");
linkp ("$melodiler?kat=$kat&sayfa=2","J-S");
linkp ("$melodiler?kat=$kat&sayfa=3","T-Z");

}
echo("<br/>");
linkp ("$melodiler","Melodi");
}
?>
</p>
</card>
</wml>
  Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the problem with my Nokia 6610? Bogi Nokia Digital Core Technology 4 ( DCT-4 ) 2 03-17-2003 20:09

 



All times are GMT +1. The time now is 00:54.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.13415 seconds with 9 queries

SEO by vBSEO