Czy jest taka możliwość by na podstawie wyników z pierwszej i drugiej funkcji , funkcja trzecia wykonała odpowiednie działanie i w przypadku TRUE lub FALSE wczytała header("location:cos2.php"); .
Załączam przykładowy kod.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" /> <meta name="Description" content=" [wstaw tu opis strony] " /> <meta name="robots" content="noarchive" /> <meta name="Generator" content="kED" /> </head> <body> <?php function fun1($a, $b ) //function fun1($a, $b, $output); { $output = 'yes'; } else { $output = 'yes'; } $output = 'yes'; } } } function fun2( $e_mail, $telef){ //function fun2( $e_mail, $telef,$output_form) $output_form = 'yes'; } $output_form = 'yes';} $output_form = 'yes'; } $output_form = 'yes'; } } // function fun3(){ // if( !$output== 'yes' AND !$output_form== 'yes') { header("location:cos2.php");} // } ?> <form action="cos1.php" method="post" enctype="MULTIPART/FORM-DATA"> <?php if($_POST['send']==1) { fun1($a, $b); // fun1($a, $b, $output); } ?> <fieldset> <legend>formularz X</legend> <label>a:</label> <label >b</label> </fieldset> <?php if($_POST['send']==1) { fun2( $e_mail, $telef); //fun2( $e_mail, $telef, $output_form); //fun3(); } ?> <fieldset> <legend>formularz Y</legend> <label >e-mail:</label> <label >telefon:</label> </fieldset> <input type="submit" name="wyslij" class="button" value=" Dalej "/> </body>