Lee-Bartlett Posted October 22, 2008 Share Posted October 22, 2008 Ok im not sure if this is right, im trying to when my button is pressed it will take that row in the db the long and lat collums and put them into the url so it goes to that bit on the map. Here is all my codes from my page. <?php require_once("includes/db_connection.php"); ?> <html> <head> </head> <body onLoad="load()" onUnload="GUnload()" > <table width="802" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#000000"> <tr> <td colspan="2" bgcolor="#0099FF"><p> </p> <p align="center" class="style1">Nexodom.com</p> <p> </p></td> </tr> <tr> <td width="102" height="318" align="left" valign="top"><p><a href="index.html">Home</a><br> <a href="wifi.php">WIFI Hot Spots</a></p> </td> <td width="674" align="left" valign="top"><p align="center">WIFI Hot Spot List</p> <?php $sql = "SELECT * from tblbasicform"; $res = mysql_query($sql) or die(mysql_error()); echo "<table border=2>"; echo "<tr> <td>Name</td><td>Email</td><td>Buissnes Name</td><td>Location</td><td>Latitude</td><td>Longitude</td> <td>Free or Paid</td><td>New</td></tr>"; while($row = MYSQL_FETCH_ARRAY($res)) { echo "<tr><td>".$row['name']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>".$row['buissnes_name']."</td>"; echo "<td>".$row['location']."</td>"; echo "<td>".$row['latitude']."</td>"; echo "<td>".$row['longitude']."</td>"; echo "<td>".$row['type']."</td>"; ; } ?> <?php $sql = "select * from tblbasicform where id='id'"; $result = mysql_query($sql); $row = mysql_fetch_array($res); echo "<form>"; echo "<td><INPUT type=\"button\" value=\"New Window!\" onClick=\"window.open'(www.nexodom.com/website/map.php?='.$row['longitude']'.'['latitude']','mywindow','width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes')\">"; echo "</td></tr>"; echo "</form>" ?> </table><br> <a href="userform.php">Submit a WIFI hotspot</a> <br /> <br /> </body> </html> Link to comment https://forums.phpfreaks.com/topic/129657-using-varibles-to-change-the-urlabout-google-map/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.