echo mysql_errno($link) . ": " . mysql_error($link) . "\n";
echo "<form method=\"post\" action=\"\">";
echo "<table>";
for ($i = 0; $i < count($items); $i++) {
$id = $items[$i]['id'];
$text = $items[$i]['text'];
echo " <tr>
<td><label><input type=\"checkbox\" name=\"delete[]\" value=\"$id\"> Удалить</label></td>
<td>$text</td>
</tr>\n";
}
echo "</table>";
echo "<input type=\"submit\">";
echo "</form>";
if (!mysql_query("SELECT ...") {
function first() { echo "first "; return false; }
function second() { echo "second "; return true; }
if (first() && second()) echo "OK"; else echo "Bad";