查询无效但未发生错误[关闭]

I want to update my table in SQL with the values but it doesn't send the values of the PHP variables to the table... but on the page, there's no error at all and the values were all stored into the variables. I'm new to PHP.

Here's the code I did:

    $query8 = "UPDATE contassessment SET test='$totTP', quiz='$totQP', asgmnt='$totAP', proj='$totPP' WHERE studID = '$stud";
    mysql_query($query8);

Any answer anyone?

You are missing a quote at the end of your query:

$query8 = "UPDATE contassessment SET test='$totTP', quiz='$totQP', asgmnt='$totAP', proj='$totPP' WHERE studID = '$stud'";
mysql_query($query8);

You should also look into using mysqli or PDO instead of mysql. Also, make sure that the value you enter in the database are sanitized. With your current query you are vulnerable to SQL injection.

To check if an error has occured after the query, you can use mysql_error: http://php.net/manual/en/function.mysql-error.php

But please make sure you use mysqli or PDO since mysql is deprecated.