hi there I just modified your source code hope to help somebody!!
byeee
Julio
gugli100@gmail.com
<?php
function validate_form(){
echo "<br>validado";
if (isset( $_POST['input1'] )) $input1 = $_POST['input1'];
if (isset( $_POST['input2'] )) $input2 = $_POST['input2'];
if (isset( $_POST['input3'] )) $input3 = $_POST['input3'];
if ($input1==1)
$ListaErrores["Error1"]="Ingrese la 1";
if ($input2==2)
$ListaErrores["Error2"]="Ingrese la 2";
if ($input3==3)
$ListaErrores["Error3"]="Ingrese la 3";
return $ListaErrores;
}
function show_form(){
if ($num_args = func_num_args()>0)
$Errores=func_get_arg(0);
if (array_key_exists('_submit_check',$_POST)) {
// If validate_form() returns errors, pass them to show_form()
if ($form_errors = validate_form()) {
show_form($form_errors);
} else {
// The submitted data is valid, so process it
process_form();
}
} else {
// The form wasn't submitted, so display
show_form();
}