captainjustin
03-02-2012, 07:33 AM
Can someone please show me what I'm doing wrong here.... Thanks in advance.... You guys Rock!
[PHP]<?php
include("conn.php");
//// Get items from url
$area1 = mysql_real_escape_string($_GET['area']);
$block_number1 = mysql_real_escape_string($_GET['block_number']);
// Set how wide you want your table
$tblWidth = 2;
// Make your query
$sql = mysql_query("select * from platform_location where block_number = \"$block_number\" and area = \"$area\"");
$i = 1;
echo '<table align=center width=100%>';
// Check to see if any results were returned
if(mysql_num_rows($sql) > 0){
echo '<tr>';
// Loop through the results
while($row = mysql_fetch_array($sql)){
echo '<td bgcolor=grey align=center><font color="ffffff"><b>'. $row['area'] .' '. $row['block_number'] .'</b></font><br>Structure Name: '. $row['structure_name'] .'<br>Latitude: '. $row['latitude'] .'<br>Longitude: '. $row['longitude'] .'<br>Attended: '. $row['attended'] .'
<br><a href="platform_info.php?p_id='. $row['p_id'] .'" target="_self"><img src="Aqua-Screensaver-icon.png" width="64" height="64" border="0" alt="Click For More Information" /></a><br></td>';
if($i == $tblWidth){
echo '</tr><tr>';
$i = 0;
}
$i++;
}
echo '</tr>';
}else{
echo '<tr><td><br>You Must Select A Block Number!</td></tr>';
}
echo '</table>';
?>[/code]
[PHP]<?php
include("conn.php");
//// Get items from url
$area1 = mysql_real_escape_string($_GET['area']);
$block_number1 = mysql_real_escape_string($_GET['block_number']);
// Set how wide you want your table
$tblWidth = 2;
// Make your query
$sql = mysql_query("select * from platform_location where block_number = \"$block_number\" and area = \"$area\"");
$i = 1;
echo '<table align=center width=100%>';
// Check to see if any results were returned
if(mysql_num_rows($sql) > 0){
echo '<tr>';
// Loop through the results
while($row = mysql_fetch_array($sql)){
echo '<td bgcolor=grey align=center><font color="ffffff"><b>'. $row['area'] .' '. $row['block_number'] .'</b></font><br>Structure Name: '. $row['structure_name'] .'<br>Latitude: '. $row['latitude'] .'<br>Longitude: '. $row['longitude'] .'<br>Attended: '. $row['attended'] .'
<br><a href="platform_info.php?p_id='. $row['p_id'] .'" target="_self"><img src="Aqua-Screensaver-icon.png" width="64" height="64" border="0" alt="Click For More Information" /></a><br></td>';
if($i == $tblWidth){
echo '</tr><tr>';
$i = 0;
}
$i++;
}
echo '</tr>';
}else{
echo '<tr><td><br>You Must Select A Block Number!</td></tr>';
}
echo '</table>';
?>[/code]