pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jesus Rios <galiza-vermelha@wanadoo.es>
To: POSTGRESQL-PHP <pgsql-php@postgresql.org>
Subject: where must i put a Script to check if a form is ok??
Date: Wed, 29 Jan 2003 03:56:03 +0100
Message-ID: <200301290256.h0T2uXM0015714@smtp.wanadoo.es> (raw)


Hi.
I have a form where a want check if some elements are on or not. I tried wirh 
a script.php where i check all the variables i need to. I there is something 
wrong, i call header and redirect the page to the form again. But . this 
script does not make anything. The page takes me to the action=confirm.php 
(of the form)

This scripts is so:


<?php
include ("globals.php");  // Fichero donde tenemos las funciones   
//COMPROBAMOS SI ESTA BIEN RELLENADO EL FORMUALARIO      
//$error_formulario=0;                  
// Comprovaformulario_una: funcion donde comprobamos si todos los radio 
buttons estan activados  
$comprova_form_una=comprovaformulario_una($nombre,$dni,$fecha_anho,$fecha_mes,$fecha_dia,$edad,$direcion,$profesion,$inicio,$voz_cantada_nop,$evolucion,$evolucion_dia,
                  
$otras_enfermedades,$esploracion_foniatra_ag,$esploracion_foniatra_ap,$inspiracion_a,$inspiracion_r,
                  
$tiempo_soplo,$tiempo_fonacion,$tiempo_habla,$coord_fono_resp,$auscultacion_vocal_a,$auscultacion_vocal_r,
                  
$ronquera,$i_media_convers,$ataque_vocal,$final_fonacion,$tono_medio,$hipertrofia_muscular,$ingurg_yugulares,
                  
$espl_morfofunc,$patolog_org,$cirugia,$rehab_cirugia,$post_rehabilitacion);   
               
if(!$comprova_form_una) {$error_formulario=0;}        
// comprobamos a mano si todos los checkbox de cada campo (relacion de n-n) 
tienen por lo menos un estado activado              
if( 
empty($so_ronquera)&&empty($so_afonia)&&empty($so_tos)&&empty($so_gallos)&&empty($so_cortes_bruscos)&&empty($so_cambio_tono)
                    &&empty($so_menor_portencia)) {$error_formulario=2;}      
              
if( 
empty($ss_sens_cuerpo_extrano)&&empty($ss_sens_mucosidad)&&empty($ss_sens_sequedad)&&empty($ss_neces_carraspeo)
                     &&empty($ss_sens_falta_aire)&&empty($ss_picor)
                    &&empty($ss_escozor)&& 
empty($ss_hormigueo)&&empty($ss_dolor)&&empty($ss_disfagia)&&empty($ss_disnea)
                     &&empty($ss_tension_muscular)&&empty($ss_fatiga_vocal)
                    &&empty($ss_neces_esfuerzo_hablar)) 
{$error_formulario=3;}    
if( 
empty($fa_estacional)&&empty($fa_frio)&&empty($fa_ambiente_polucionado)&&empty($fa_bebidas_frias)&&empty($fa_abuso_vocal)&&empty($fa_reposo_vocal)
                    &&empty($fa_ansiedad_estres)&&empty($fa_otros)) 
{$error_formulario=4;}
if( 
empty($resp_r_costal_supino)&&empty($resp_r_costo_abdominal)&&empty($resp_r_diafragmatica)&&empty($resp_r_mixta)
                     &&empty($resp_r_nasal)&&empty($resp_r_bucal)) 
{$error_formulario=5;}                      
if( 
empty($resp_f_costal_sup)&&empty($resp_f_costo_abdominal)&&empty($resp_f_diafragmatica)&&empty($resp_f_mixta)
                     &&empty($resp_f_nasal)&&empty($resp_f_bucal)) 
{$error_formulario=6;}                     
if( 
empty($espiracion_adaptada_intensidad)&&empty($espiracion_insuficiente)&&empty($espiracion_comienzo_brusco)&&empty($espiracion_agotando_aire)
                     &&empty($espiracion_perdida_aire_inicio)) 
{$error_formulario=7;}  
if( 
empty($timbre_normal)&&empty($timbre_ruidos_a)&&empty($timbre_ruidos_b)&&empty($timbre_forzado)
                     
&&empty($timbre_apagado)&&empty($timbre_monotono)&&empty($timbre_hipernasal)) 
{$error_formulario=8;} 
if(($hipertrofia_muscular=="si")&& 
empty($hipertrofia_muscular)&&empty($hipertrofia_muscular)&&empty($hipertrofia_muscular_si_infra)&&empty($hipertrofia_muscular_si_supra)
       &&empty($hipertrofia_muscular_si_latero))    {$error_formulario=9;}    
if(($ingurg_yugulares=="si")&& 
empty($ingurg_yugulares_r)&&empty($ingurg_yugulares_f))    
{$error_formulario=10;}     
if(($patolog_org=="si")&& 
empty($patolog_org_nodulos)&&empty($patolog_org_papilomas)&&empty($patolog_org_carcinoma)
             
&&empty($patolog_org_polipos)&&empty($patolog_org_leucoqueratosis)&&empty($patolog_org_paralisis)
              &&empty($patolog_org_otros))   
               {$error_formulario=11;}                 
if(empty($terapeutica_rehab_relajacion)&&empty($terapeutica_rehab_masaje)&&empty($terapeutica_rehab_ortofonica)) 
        {$error_formulario=12;}   
if (!empty($error_formulario))
   {  
    echo "esot es la oxtia"     ;
    //formulario_incompleto();
    //header('Location:alta_pacientes.html');	         
   }
?>



where do i have to insert it at the file.html?. 

i tried at <head> ..... </head> and did not go ok.

can anybody help me?



Message-ID: <200301290256.h0T2uXM0015714@smtp.wanadoo.es>
Permalink:  ../200301290256.h0T2uXM0015714@smtp.wanadoo.es/
Also on:    postgresql.org/message-id/200301290256.h0T2uXM0015714@smtp.wanadoo.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: galiza-vermelha@wanadoo.es
  Subject: Re: where must i put a Script to check if a form is ok??
  In-Reply-To: <200301290256.h0T2uXM0015714@smtp.wanadoo.es>
  References: <200301290256.h0T2uXM0015714@smtp.wanadoo.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox