This is the problem: I try to change the original name (originalname, got this from the database) to the modified name (modname). I guess the problem is something with the quotes, but it can as well be something else. Connection with the database is no problem.
thx,
Trompie
modteacher1.php
<form action="modteacher2.php" method=post>
<table>
<tr>
<?
print "<td>This was the original name:</td>
<td><input type=text name=originalname value= '$docents[0]'></td>"
?>
</tr>
<tr>
<td>Name:</td>
<td><input type=text name=modname></td>
</tr>
<tr><td><input type=submit name=Submit value=Submit></td></tr>
</table>
</form>
modteacher2.php
....
<?
$modname = addslashes($modname);
$originalname= addslashes($originalname);
//update database
$query = "update docent set docentname = '$modname' where docentname = '".$originalname."' ";
$result = mysql_query($query);
if ($result)
print "OK";
else
print "NOK";
?>
...