Interactions controller-model

avec attention à l'utilisation des structures de données par les View



      $user = Model_DB::listAllUsers('last_name');
      $userArray = $user->fetchAll();
      $this->registry->template->userArray = $userArray;


              if (isset($userArray)) {
                  foreach ($userArray as $user) {
                      if ($user->role == 2) {
                          echo '<option value="' . $user->id . '">' . $user->last_name . ' ' . $user->first_name . '</option>';




html forms notes

Radio buttons


''<INPUT type=radio name="taskChoice" value="0" CHECKED>'' planqué (ligne "aucune"?)
''<INPUT type=radio name="taskChoice" value="'.$id$.'" >'' pour chaque ligne
<INPUT type=submit name="chercher" value="chercher">
<INPUT type=

In the following example from, only one payment method may be selected by the user since the radio buttons have the same NAME:

<P>Please indicate your method of payment:</P>
<P><LABEL ACCESSKEY=C><INPUT TYPE=radio NAME="payment_method" VALUE="credit card" CHECKED>
   Credit card</LABEL><BR>
<LABEL ACCESSKEY=D><INPUT TYPE=radio NAME="payment_method" VALUE="debit card">
 Debit  card</LABEL><BR>
<LABEL ACCESSKEY=M><INPUT TYPE=radio NAME="payment_method" VALUE="money order">
 Money order</LABEL></P>

<P><LABEL ACCESSKEY=S><INPUT TYPE=checkbox NAME="send_receipt" VALUE="yes" CHECKED>
 Send receipt by e-mail</LABEL></P>
projet_dch/model_db.txt · Dernière modification: 2011/05/09 19:32 par suitable
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante :CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki