WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Iron Speed
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old November 8th, 2004, 07:24 PM
jpveneracion jpveneracion is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 jpveneracion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No Gateway reply on these pages

Hi!

Good Day guys!

My error on the Subject line...
Sorry!
i have these two wml pages...
browse.php and cat.php

BROWSE.PHP

<?php
include "include/wml.inc";
include "config.php";
?>
<card id="index" title="Select Type">
<p align="center" mode="wrap">Welcome
<br/>
<br/>
</p>
<p align="left" mode="wrap">Type of building:
<select name="category">
<?php
$sql = "SELECT DISTINCT category FROM $tname ORDER BY category ASC";
$query = mysql_db_query($dname,$sql,$my_conn);
?>
<?php
while ($row = mysql_fetch_array($query))
{
echo "<option value=\"$row[category]\">";
echo ucwords($row[category]);
echo "</option>";
}
?>
</select>
<anchor>Submit
<go href="cat.php" method="get">
<postfield name="category" value="$category"/>
</go>
</anchor>
</p>
</card>
</wml>

CAT.PHP

<?php
include "include/wml.inc";
include "config.php";
?>
<?php
$max = 5;
$cat_search = "bank";
?>
<card id="index" title="Select Type">
<p align="center" mode="wrap">Welcome
<br/>
<br/>
Type of building: <b><?php echo ucwords($cat_search) ?></b>
</p>
<p align="left" mode="wrap">Choose a building
<br/>
<?php
if(isset($_GET['np']))
{
$pages = $_GET['np'];
}
else
{
$sqlcnt = "SELECT * FROM $tname WHERE category = '$cat_search'";
$run = mysql_db_query($dname,$sqlcnt,$my_conn);
$count = mysql_num_rows($run);
if($count > $max)
{
$pages = ceil($count/$max);
}
else
{
$pages = 1;
}
}
if(isset($_GET['st']))
{
$start = $_GET['st'];
}
else
{
$start = 0;
}

$sql = "SELECT * FROM $tname WHERE category = '$cat_search' ORDER BY place ASC LIMIT $start, $max";
$query = mysql_db_query($dname,$sql,$my_conn);
echo "<select name=\"building\">";
while ($row = mysql_fetch_array($query))
{
echo "<option value=\"$row[place]\">";
echo ucwords(strtolower($row[place]));
echo "</option>\n";
}
echo "</select>";
echo "<br/>\n";
echo "<anchor>Submit";
echo "<go href=\"building.php\" method=\"get\">";
echo "<postfield name=\"building\" value=\"$building\"/>";
echo "</go>";
echo "</anchor>";
echo "<br/>";
echo "<br/>\n";
if($pages > 1)
{
$current = ($start/$max) + 1;
if($current != 1)
{
echo '<a href="cat.php?st=' . ($start - $max) . '&np=' . $pages .'">Back </a>';
}

if($current != $pages)
{
echo '<a href="cat.php?st=' . ($start + $max) . '&np=' . $pages .'"> Next</a>';
}
}
?>
</p>
</card>
</wml>

yes the wml headers is in "include/wml.inc"
Problem is CAT.PHP errors with "NO GATEWAY REPLY"
i only created CAT.PHP with editing the SQL for BROWSE.PHP
and some formatting...
tnx guys!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > No Gateway reply on these pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway