All pastes #938474 Raw Edit

Anonymous

public php v1 · immutable
·published 2008-03-11 17:48 UTC
rendered paste body
<?include("config.php");//$sql="SELECT * FROM subcategory WHERE id = '".$q."'";$count = 0; $varcount = 1;$sql="SELECT * FROM subcategory WHERE $q IN(tag_1, tag_2, tag_3, tag_4, tag_5)";$result = mysql_query($sql);echo "<table border='1'><tr><th>Subcategory</th></tr>";while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td><input type=\"checkbox\" name=\"subtag_". $varcount ."_1\" value=\"" . $row['id'] . "\">" . $row['name'] . " subtag_" . $varcount . "_1</td>"; echo "</tr>"; $varcount++; }echo "</table>";?>