Your code is open to injection, maybe start working with PDO -
See Tutorial
That being said, you are making a reference to director_id but nowhere did you gave it a value? Maybe add it in this part of your code depending on the array number -
$title = $row[0];
$director_id = $row[1];
$director = $row[2];
$time = $row[5];
$rev = $row[6];
You should also add error checking and check your database settings, it should not update a record if 1 field is missing. This can be fixed when you create your table by using the
NOT NULL
operator.