Bonjour, j'ai souci avec un script que je suis entrain de ré-écrire et l'interception d'un évent intercepté via $_post ne se fait comme avant...
Des prints et user_error, netbeans ne m'aide pas... bref je vous soumets mon souci

Les parties de code que je considère comme des points de repère sont en gras

Le code est censé valider une forme et n'est pas achevé !

Voici les prints:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
Form[__construct]
 
Test de validation d'un formulaire
 
Prénom 		
Nom
 
 
Form[addString][prenom]
String[__construct][prenom]
Form[addString][nom]
String[__construct][nom]
Form[initForm]
String[initField]
String[initField]
No submit
Voici une partie de mon script:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?php
	session_start() ;
	$title = "Test Form" ;

// ------------------------------------------------------------------------------------------------------------------------------------------------- //
//                                      My stuff's                                                                                                   //
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
	require_once $_SERVER['DOCUMENT_ROOT'] . "/config/equate.php";  
/**
* 	ERRORHANDLER constructor
*
*/	
 	require_once $_SERVER['DOCUMENT_ROOT'] . "/class/Exception.php";  
 	require_once $_SERVER['DOCUMENT_ROOT'] . "/config/stack.php";  

// ------------------------------------------------------------------------------------------------------------------------------------------------- //
//                                      FORM                                                                                                         //
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
/**
* 	FORM: constructor
*
*/	
		class Form extends Exception
		{	private $cnt = 0, $form, $formTitle ;
			private $msg,  $tabMsg = array( 	VIDE  => "Pr&ecirc;t &acirc; recevoir l'encodade de votre formulaire"     ,
 												KO    => "Veuillez corriger les fautes/complètez votre formulaire"   ,
												OK    => "Parfait, pas(plus) d'erreur(s) dans ce formulaire"   
					 			   		  ) ;
				
			function __construct($formTitle)
			{	$this->form = NULL ;
				$this->cnt	= 0 ;
				$this->msg  = VIDE ;
				$this->formTitle = $formTitle ;
				print("Form[__construct]" . CRLF) ;
			}
				
/**
* 	FORM: initForm
*
*/			
			function initForm()
			{   print("Form[initForm]" . CRLF) ;
				for($i = 0 ; $i < $this->cnt ; $i++) 
				{	//print("Form[".$i."/".$this->cnt."]" . CRLF) ;
					$this->form[$i]->initField() ;
//					$this->form[$i]->isFilled() ;
				}		
				Stack::emptyStack() ;
			}
				
/**
* 	FORM: validateForm
*
*/			
			function validateForm()
			{   print("Form[validateForm]" . CRLF) ;
				for($i = 0 ; $i < $this->cnt ; $i++) 
				{	print("Form Validate[".$i."/".$this->cnt."]" . CRLF) ;
					$this->form[$i]->validateField() ;
				}		
			}
				
/**
* 	FORM: addText
*
*/			
			function addText($fldName, $fldMust, $fldType, $fldError, $FldMinl, $fldMaxl)
			{   print("Form[addText][$fldName]" . CRLF) ;
				$this->form[$this->cnt++] = new Text($fldName, $fldMust, $fldType, $fldError, $FldMinl, $fldMaxl) ;
			}
				
/**
* 	FORM: addString
*
*/			
			function addString($fldName, $fldMust, $fldType, $fldError, $FldMinl, $fldMaxl)
			{   print("Form[addString][$fldName]" . CRLF) ;
				$this->form[$this->cnt++] = new String($fldName, $fldMust, $fldType, $fldError, $FldMinl, $fldMaxl) ;
			}

/**
* 	FORM: all -__get Functions
*
*/
			function getTitle()
			{	return($this->formTitle) ;	}
/**
* 	FORM: stack Error Functionss
*
*/			
			public function getStackError()            // Public car function appelée du formulaire...
			{	return(Stack::getStackError()) ; }
			
			public function getMsg()                   // Public car function appelée du formulaire...
			{	return($this->tabMsg[$this->msg]) ;  	
			}
			
			public function isFormValid()
			{ 	return(Stack::getCntStack() == 0) ;	}       
//          ==================================		
		}

//	======================================================================================================================================================== //
//	======================================================================================================================================================== //
//										INTERFACE: Validator                                                                        //	
//  ======================================================================================================================================================== //
//	======================================================================================================================================================== //
		interface MethodList
		{	
			function ValidateField() ;
			function isFilled() ; 
//			function mustFill() ;
//			function chkRange() ;
//			function stackMessage() ;
		}
				
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
//                                      STRING                                                                                                       //
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
/**
* 	STRING: constructor
*
*/			
		class String implements MethodList
		{	private $fldName, $fldMust, $fldType, $fldError, $fldMinl, $fldMaxl ;

			function __construct($fldName, $fldMust, $fldType, $fldError, $fldMinl, $fldMaxl)
			{	$this->fldName  = $fldName  ;
				$this->fldMust  = $fldMust  ;
				$this->fldName  = $fldName  ;
				$this->fldName  = $fldName  ;
				$this->fldName  = $fldName  ;
				$this->fldName  = $fldName  ;

				print("String[__construct][$fldName]" . CRLF ) ;
			}
				
/**
* 	STRING: initField
*
*/			function initField()
			{   print("String[initField]" . CRLF) ;
			}
			
/**
* 	FORM: validateField
*
*/			
			function validateField()
			{   print("String[validateField]" . CRLF) ;
			}
				
/**
* 	STRING: isFilled
*
*/
			function isFilled()
			{ 	$fi = (isset( $_POST["$this->fldName"] ) ) AND ($_POST["$this->fldName"] != NULL);
				print("String[isFilled][$fi]" . CRLF) ;
				return( $fi ) ; 
			}
		}
		
	$cf = new Form	("Test de validation d'un formulaire") ;
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
//                                      HRML User Screen                                                                                             //
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
	require_once $_SERVER['DOCUMENT_ROOT'] . "/config/htmltop.php";  
	require_once $_SERVER['DOCUMENT_ROOT'] . "/user/panel.php";  
	require_once $_SERVER['DOCUMENT_ROOT'] . "/config/htmlbot.php";  

	$cf->addString( 	"prenom"	,  	MUST , 	aE    	, 	WARN 	,  3, 30   					) ;
	$cf->addString( 	"nom"		,  	MUST , 	aE    	, 	WARN 	,  3, 30   				 	) ;
	$cf->initForm() ;
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
//                                      Events Form definitions                                                                                      //
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
/**
* 	Event[SUBMIT] definition
*
*/
   	if (isset($_POST['SUBMIT']))
		{	print("_POST" . CRLF) ;
			$cf->validateForm() ;
			if ($cf->isFormValid())
				{	# Formulaire valide
					user_error("FORM OK !" , E_USER_NOTICE) ;
					print("FORM OK" . CRLF) ;
					# Instruction ...
				}
			else 
				{	# Sinon ...
					user_error("FORM KO !" , E_USER_NOTICE) ;
					print("FORM KO" . CRLF) ;
					# Instruction ...
				}
		}
	else
		print("No submit" . CRLF) ;
		
// ------------------------------------------------------------------------------------------------------------------------------------------------- //
?>
La forme avec le bouton submit...

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
//
//  Form definition (for validation purposes)
//
?>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" name="CheckForm">
<table width="615" border="0">
  <tr>
    <td>&nbsp;</td>
    <td colspan="4"><div align="center"><b><?php echo $cf->getTitle() ?></b></div></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="6"><hr /></td>
  </tr>
  <?php
  		if (!$cf->isFormValid())
			{
  ?>
  <tr>
    <td height="104">&nbsp;</td>
    <td colspan="4" align="center">
        <textarea name="textarea" cols="70" rows="5"><?php echo $cf->getStackError()?></textarea>   
	</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="6"><hr /></td>
  </tr>
  <?php
  			}
  ?>
  <tr>
    <td width="60">Prénom</td>
    <td width="130">
		<input type="text" name="prenom" maxlength="32" value="<?php if (isset($_POST['prenom'])) echo $_POST['prenom'] ?>"/>	</td>
    <td width="127"><div align="center">Nom</div></td>
    <td width="149"><input type="text" name="nom"   maxlength="32" value="<?php if (isset($_POST['nom'])) echo $_POST['nom'] ?>" /></td>
    <td width="46">&nbsp;</td>
    <td width="62">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="6"><hr/></td>
  </tr>
  <tr>
    <td><input type="reset"  name="effacer"   value="Effacer"/></td>
    <td colspan="4" align="center">
      <input type="text"   size=60 name="message"   value="<?php if (isset($cf)) echo $cf->getMsg() ?>" />    </td>
    <td><input type="submit" name="SUBMIT"   value="Envoyer"/></td>
  </tr>
</table>
</form>
J'espère que vous pourrez aider...
Merci @tous