I have a small problem. I wrote this script to update the status of my list using a checkbox for each line I want updated. But I (beeing new to this whole thing) can't seem to get my button to do what I want it to do.
<?php
//ansluter till databasen
$opendb=mysql_connect("XXXXX", "XXXXX", "XXXXX") or die(mysql_error());
mysql_select_db("XXXXX") or die(mysql_error());
//skriver information till den angivna tabellen
$today = date("Y-m-d");
$result = mysql_query("SELECT * FROM bills")
or die(mysql_error());
//Tabellstart
echo "<h2>Månadens registrerade räkningar</h2>";
echo "<table border='1' bordercolor='#cccccc' cellspacing='0' cellpadding='3'>";
echo "<tr bgcolor='#c3c3c3'><td>Primär mottagare</td><td>Sekundär mottagare</td><td>Förfallodatum</td><td>Belopp</td></tr>";
//Visar räkning som registrerats
while($row = mysql_fetch_array( $result ))
{
if ($row['Betald'] <> "on") {
echo "<tr><td>";
echo $row['Betald'];
echo "<tr><td>";
echo $row['Primar'];
echo "</td><td>";
echo $row['Sekundar'];
echo "</td><td>";
echo $row['Forfallodatum'];
echo "</td><td>";
echo $row['Belopp'];
echo "</td></tr>";
$summa +=$row['Belopp'];
}
}
//Tabellslut
echo "<tr><td colspan=2></td><td>Totalsumma:</td><td>".$summa."</td></tr>";
echo "</table>";
//stänger databasen
mysql_close($opendb);
?>
Anyone got a "quickfix" for me?