Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/01/2012, 20:24
privatefta
(Desactivado)
 
Fecha de Ingreso: septiembre-2010
Mensajes: 498
Antigüedad: 14 años, 5 meses
Puntos: 5
problema con Call to undefined

hola a todos es que tengo este problemita

Fatal error: Call to undefined function modifica() in C:\AppServ\www\ejemplo\cambiar_vencimiento.php on line 6

y este es el codigo

Código PHP:
Ver original
  1. <?php
  2. if ($_ConectaBD) {
  3. if (isset($_POST["action"]) and $_POST["action"] == "Cambiar") {
  4.     $status  = modifica($_POST['usuario'], $_POST['fecha']);
  5. }
  6. function modifica($usuario, $fecha) {              
  7.     conectar();  
  8.     mysql_query("UPDATE usuarios SET Fecha='".$fecha."' WHERE usuario='".$usuario."") or die ("Error deleting user");
  9.     desconectar();
  10.     return("Corregida la decha del usuario.");
  11.  }
  12. }
  13. ?>
  14. <script src="src/js/jscal2.js"></script>
  15. <script src="src/js/lang/en.js"></script>
  16. <link rel="stylesheet" type="text/css" href="src/css/jscal2.css" />
  17. <link rel="stylesheet" type="text/css" href="src/css/border-radius.css" />
  18. <link rel="stylesheet" type="text/css" href="src/css/steel/steel.css" />
  19. <table cellSpacing=0 cellPadding=0 width="540" border=0 valign="top">
  20.   <tr>
  21.     <td align="center"><span class="style11CVerde"><b>Correguir fecha de vencimiento</b></span></td>
  22.   </tr>
  23.   <tr>
  24.     <td><hr></td>
  25.   </tr>
  26.   <tr>
  27.     <td>
  28. <form name="form1" id="form1" action="" method="post">
  29.     <label style="margin-right:34px">
  30.         Usuario:
  31.     </label>
  32.     <input type="text" name="usuario" id="usuario" value="" /><br />
  33.     <label>
  34.         Fecha nueva:
  35.     </label>
  36.    <input name="fecha" readonly  type="text" id="fecha" value="" size="10"/>
  37.     <img src="images/calendar_date.png" name="trigger" width="24" height="24" id="trigger" />
  38.     <script type="text/javascript">//<![CDATA[
  39.       Calendar.setup({
  40.         inputField : "fecha",
  41.         trigger    : "trigger",
  42.         onSelect   : function() { this.hide() },
  43.         dateFormat : "%Y-%m-%d"
  44.       });
  45.     //]]></script><br />
  46.     <input type="submit" name="action" value="Cambiar" class="submit"/>
  47. </form>
  48. <br />
  49. <?php
  50. if ($status <> "") {
  51.     print("<br><font color=\"#347C2C\">".$status."</font><br><br>");
  52. }
  53. ?>
  54.     </td>
  55.   </tr>
  56. </table>

por que me tiraria ese eror en la linia 6 gracias