<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hey all,<br><br>I am new to working with phpmapscript...i've used the PHPMapscript example at mapserver.gis.umn.edu, and have found a code snippet for an arrow (function panarrow()), however when i try to get it to work with an input button in html the map just refreshes itself.  what changes should I make?  thanks.<br><br><?php<br><br>dl('php_mapscript.dll');<br><br>$val_zsize=3;<br>$check_pan="CHECKED";<br>$map_path="c:/ms4w/apache/htdocs/geog490/";<br>$map_file="terrehaute.map";<br><br>$map = ms_newMapObj($map_path.$map_file);<br><br><br>if ( isset($HTTP_POST_VARS["mapa_x"]) && isset($HTTP_POST_VARS["mapa_y"])<br>      && !isset($HTTP_POST_VARS["full"]) ) {<br><br>      $extent_to_set = explode("
 ",$HTTP_POST_VARS["extent"]); <br><br>      $map->setextent($extent_to_set[0],$extent_to_set[1],<br>                      $extent_to_set[2],$extent_to_set[3]);<br><br>      $my_point = ms_newpointObj();<br>      $my_point->setXY($HTTP_POST_VARS["mapa_x"],$HTTP_POST_VARS["mapa_y"]);<br><br>      $my_extent = ms_newrectObj();<br><br>      $my_extent->setextent($extent_to_set[0],$extent_to_set[1],<br>                              $extent_to_set[2],$extent_to_set[3]);<br><br>      $zoom_factor =
 $HTTP_POST_VARS["zoom"]*$HTTP_POST_VARS["zsize"];<br>      if ($zoom_factor == 0) {<br>              $zoom_factor = 1;<br>              $check_pan = "CHECKED";<br>              $check_zout = "";<br>              $check_zin = "";<br>      } else if ($zoom_factor < 0) {<br>              $check_pan = "";<br>              $check_zout = "CHECKED";<br>              $check_zin = "";<br>      } else
 {<br>              $check_pan = "";<br>              $check_zout = "";<br>              $check_zin = "CHECKED";<br>      }<br><br>      $val_zsize = abs($zoom_factor);<br><br>      $map->zoompoint($zoom_factor,$my_point,$map->width,$map->height,<br>                      $my_extent);<br><br>}<br>function panarrow ($map, $HTTP_POST_VARS) {<br>    <br>    $xmax = intval($HTTP_POST_VARS["maxx"]);     // E<br>    $xmin = intval($HTTP_POST_VARS["minx"]);     // W<br>    $xinc = ($maxx - $minx )
 / 5;     // pan-factor<br>    $ymax = intval($HTTP_POST_VARS["maxy"]);     // S<br>    $ymin = intval($HTTP_POST_VARS["miny"]);    // N<br>    $yinc = ($maxy - $miny ) / 5;    // pan-factor <br><br>    // which button is pressed<br>    if ( isset($HTTP_POST_VARS["panN_x"])) {<br>        $map->setextent( $minx, ($miny + $yinc), $maxx, ($maxy +$yinc));<br>            }<br>    elseif ( isset($HTTP_POST_VARS["panS_x"])) {<br>        $map->setextent( $minx, ($miny - $yinc), $maxx, ($maxy - $yinc));<br>            }<br>    elseif ( isset($HTTP_POST_VARS["panW_x"])) {<br>        $map->setextent( ($minx
 - $xinc), $miny, ($maxx - $xinc),$maxy);<br>            }<br>    elseif ( isset($HTTP_POST_VARS["panE_x"])) {<br>        $map->setextent( ($minx + $xinc), $miny, ($maxx + $xinc),$maxy);<br>            }<br>}<br><br><br>$image=$map->draw();<br>$image_url=$image->saveWebImage();<br><br>$extent_to_html = $map->extent->minx." ".$map->extent->miny." "<br>              .$map->extent->maxx." ".$map->extent->maxy;<br>//////////////////here's the html where I bring up the arrow:<br><tr><td>Pan North</td><br>     <td><input type="submit" name="pan north" value="pan north" <?php echo $panN?> ></td></tr><br><br><hr style="width: 100%; height: 2px;"><font
 size="4">Joe Nannery<br>Joealan@sbcglobal.net</font><br><br><br><br><br></div></div></body></html>