It`s dificult to make an universal wap page... then we need to do a phone recognition...
try this code, I hope it`ll help:
<?
//Some settings
$url = 'http://www.pramoga.net'; //where installed 4images
$title = 'wap.pramoga.net'; //title for wap card
$no_id = 'ID not found'; //msg when no id found
$enter_id = 'ID'; //msg when user comes
$button = ' find >'; //text for button
$footer = 'Pramoga.net'; //footer text
$dbhost = "localhost";
$dbuser = "dbuser";
$dbpass = "dbpass";
$dbname = "pramoga_pramoga";
//dont need to change after this
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="<? echo $title ?>">
<p>
<br />
<?
$id = $_REQUEST['id'];
if($id!=""){
$db = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die ("Error");
@mysql_select_db("$dbname", $db) or die ("DB not found");
$result = mysql_query("SELECT image_id, image_media_file, cat_id, image_name FROM 4images_images where image_id=$id");
$row = mysql_fetch_array($result);
$image_id = $row["image_id"];
$cat_id = $row["cat_id"];
$image_name = $row["image_name"];
if ($image_id!=""){
$image_media_file = $row["image_media_file"];
?>
Spausk nuoroda, kad parsisiusti:
<a href="<? echo $url;?>/data/media/<? echo $cat_id;echo "/";echo $image_media_file; ?>"><? echo $image_name;?></a><br />
<? }
else { echo $no_id,"<br />"; }
}
else { echo $enter_id,"<br />"; }
?>
<br />
<input name="id" /><br />
<a href="index.php?id=$(id)"><? echo $button ?></a>
</p>
</card>
</wml>