Page 292 - Beginning PHP 5.3
P. 292

Part III: Using PHP in Practice





















                         Figure 9-8























                         Figure 9-9



                How It Works
                For each step of the signup process, the script displays a form with a hidden field, step, to track the
                current step. For example:

                            <input type=”hidden” name=”step” value=”1” />

                The script starts by testing for the presence of this field in the submitted form data. If found, and its
                value is valid (between 1 and 3), the script uses PHP’s call_user_func() function to call the
                appropriate processing function — processStep1(), processStep2(), or processStep3(). If the







              254





                                                                                                      9/21/09   7:23:45 PM
          c09.indd   254                                                                              9/21/09   7:23:45 PM
          c09.indd   254
   287   288   289   290   291   292   293   294   295   296   297