Hi. First of all, where it said $id, that was supposed to be $callsign, that's a scripting mistake that is now corrected. Unfortunatly, it does not make a diffrence. 🙁
This is the error: "Error in query.You have an error in your SQL syntax near '' at line 1"
Also, it works if i JUST update the table, without the password protection.
This is the new code:
<?php
require("connection.php");// file holding connection details
$request="SELECT * FROM roster WHERE callsign='$callsign' AND password='$password'";
$result = mysql_db_query($db, $request, $connection) or die("Error in
query." .mysql_error());
// if mysql_num_rows doesn't = 1 there is no record in
// the data base which matches
if(mysql_num_rows($result) == 1)
{
$query = "UPDATE roster SET hours = '$hours' WHERE callsign=$callsign";
$result = mysql_db_query($db, $query, $connection) or die
("Error in query." .mysql_error());
}
else
{
print("Could not file report");
}
?>