Advertisement
Advertisement
| 12.06.2007 at 11:31AM PST, ID: 23006982 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: |
<?php
if(isset($_REQUEST["state"]) && $_REQUEST["state"]!=""){
$id = $_REQUEST['state'];
$sql = "SELECT * FROM papers WHERE state_id='$id' AND cat_id=2";
$query = mysql_query($sql) or die(mysql_error());
$state = $_GET["state_name"];
$state_name_query = "SELECT state_name FROM states WHERE state_id=$id";
$get_state_name = mysql_query($state_name_query) or die(mysql_error());
list($state) = mysql_fetch_row($get_state_name);
print "
<h2>$state</h2>
<table id=\"myTable\" width=\"100%\" class=\"tablesorter\">
<thead>
<tr>
<th>Paper Name</th>
<th>City</th>
<th>Circulation</th>
<th>Price</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
";
while($row = mysql_fetch_array($query)){
print "<tr>";
print "<td>".$row["name"]."</td>\n";
print "<td>".$row["city"]."</td>\n";
print "<td>".$row["circulation"]."</td>\n";
print "<td>$".$row["price"]."</td>\n";
print "<td class=\"desc\" align=\"center\">\n<span class=formInfo\">\n<a href=\"description.php?id=".$row["id"]."\" class=\"jTip\" id=\"desc_".$row["id"]."\" rel=\"description.php?id=".$row["id"]."&width=250&name=Description%20as%20follow:\"><img src=\"images/newspaper.png\" alt=\"description\" /></a></span></td>\n";
print "<td align=\"center\"><a href=\"#\"><img src=\"images/dollar.png\" alt=\"purchase\" /></a></td>\n";
print "</tr>\n";
}
print "</tbody>\n";
print "</table>\n";
}else
{
?>
<h2>Specialty Papers</h2>
<h3>Pick a state below to view papers.</h3>
<table id="state">
<?php
error_reporting(E_ALL);
$query = mysql_query("SELECT state_name,state_id FROM states");
$i=1;
while($row1 = mysql_fetch_array($query)){
if($i%2){
echo '<tr><td width="300" class="st"><a href="?p=speciality&state='.$row1["state_id"].'">'.$row1["state_name"].'</a></td>';
}
else{
echo '<td width="300" class="st"><a href="?p=speciality&state='.$row1["state_id"].'">'.$row1["state_name"].'</a></td></tr>';
}
$i++;
}
if(mysql_num_rows($query)%2) {
print "<td> </td></tr>";
}
?>
</table>
<?php
//echo "Error has occured"; <-- what is this for?
}
?>
|