| ||||
Código:
<form action="pagina1.php" method="post"> <input type="submit" value="Agregar" name="agrega"> </form> <form action="pagina2.php" method="post"> <input type="submit" value="Modificar" name="modifica"> </form> |
| ||||
<form action=\"agreaviso.php?login=$login\" method=\"post\"> <table border=\"0\" height=\"100\" > <tr> <td align=\"center\"> Redactar Avisos <br> <textarea name=\"aviso\" cols=\"30\" rows=\"10\" ></textarea> </td> <td> <input name=\"agregar\" type=\"submit\" value=\" Agregar \" class=\"styleBoton\"> <br><br> <input name=\"reset\" type=\"reset\" id=\"reset\"value=\" Borrar \" class=\"styleBoton\"> </form> <form action=\"modaviso.php?login=$login&aviso=$aviso\" method=\"post\"> <input name=\"modificar\" type=\"submit\" value=\"Modificar\" class=\"styleBoton\" > </form> </td> </table> /*******esto lo tengoasi si me agregar pero no modifica ya que el valor del textarea no lo puede recuperar***********/ |
| ||||
Podrías tener todos los botones de submit con el mismo nombre y ya solo comparar a que equivale el nombre de cada boton con un switch: Código PHP: |