mira aver si mejor asi
Formulario del segundo frame: Código HTML:
<html>
<head>
<title> Modifcacions</title>
</head>
<body>
<form action="modifica2.php" method="POST" target="segon">
<p>
Nom:<input name="nom" type="text" size="15">
</p>
<p>
Localitat: <input name="nom" type="text" size="15">
</p>
<p>
Numero de departament_ <input name="nom" type="text" size="15">
</p>
<p>
<input name="act" type="submit" value="actualitzar" size="15">
</p>
</form>
</body>
</html>
PHP de modificacio dle segundo frame: Código PHP:
<?php
$conexio=mysql_connect("localhost","root","");
mysql_select_db('exercicis',$conexio); //conexio
$resultat=mysql_query("UPDATE departamentos SET dnombre='$nom',loc='$localitat' WHERE dept_no=$dept_no",$conexio);
$files=mysql_affected_rows($conexio);
if(mysql_error($conexio)==0) {
echo "<center><h2> FILES MODIFICADES: $files</h2></center>;
}
else
{
$numeroerror=mysql_errno ($conexio);
$descripcioerror ($conexio);
echo "nºderror: $numeroerror ERROR * Descripcio: $descripcioerror: ERROR";
}
exit();
mysql_close();
?>