When you did this last try, did you get any errors from mysql_error() or did it just not update the value? Have you actually checked the value before and after to see that it did not change?
Have you checked that the $newfilename and $id variables have the values you'd expect? Try i.e. to dump them with
PHP Code:
var_dump($newfilename, $id)
You should try to narrow down where the error occurs. Add some debug echos here and there to verify that all variables have the expected values and that functions returns what they should.
As an example:
PHP Code:
// ... $a = get_a_number(); $b = 6; var_dump($a, $b); // check what values they have
$c = add_numbers($a, $b); var_dump($c);
// ...
Lets say $a is 3 and $b is 6, then $c should be 9. But $c is 13, then that would tell you that the error lies somewhere in the function add_numbers().
PHP Code:
// ... $a = get_mood(); if ($a == "happy") { do_something(); echo "1"; // some simple debug } else { do_something_else(); echo "2"; } // ...
Lets say $a should be "happy", but the script echoes "2", that tells you that there's probably something wrong with the function get_mood().
After you've narrowed down the error, you might spot the problem yourself, or else you will at least have more information to give here on the forum and someone might be able to help you further.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
|