Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/04/2012, 14:23
Avatar de Fleon
Fleon
 
Fecha de Ingreso: febrero-2010
Mensajes: 138
Antigüedad: 14 años, 3 meses
Puntos: 3
Respuesta: Validacion funciona pero igual pasa con errores

Bueno, yo hice una chapuza, pero me funciona de momento:

Código PHP:
Ver original
  1. if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'edit') { 
  2.         if ($_POST['cliente_nombre'] == '') {
  3.             echo '<script type="text/javascript">
  4.                     alert(\'Debes ingresar el nombre del cliente!.\');
  5.                     history.back();
  6.                  </script>';
  7.                  exit;
  8.         } else {
  9.             $smcFunc['db_query']('', '
  10.                 UPDATE {db_prefix}da_anuncios_clientes
  11.                 SET cliente_nombre = {string:name}, cliente_link = {string:link}, activo = {int:active}
  12.                 WHERE id = {int:cliente_id}',
  13.                 array(
  14.                     'cliente_id' => $_POST['cliid'],
  15.                     'name' => $_POST['cliente_nombre'],
  16.                     'link' => $_POST['cliente_url'],
  17.                     'active' => $_POST['cliente_activo'],
  18.                 )
  19.             );
  20.            
  21.             redirectexit('action=admin;area=manageanuncios;sa=clientes');  
  22.        }
  23.      }

Saludos.