|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > No Gateway reply on these pages |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|