Re: Preventing repetition of a Form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 7, 2013, at 6:00 PM, Ethan Rosenberg, PhD wrote:

Dear list -

I have a program [*pseudo code*]:

      if(!isset($_REQUEST["welcome_already_seen"]))
      {
           initialize variables
      }

         $errors_array = array();
           if($_REQUEST["welcome_already_seen"]== "already_seen")
           {
           check_data();
                  if(count($errors_array) != 0)
                  {
                   show_errors();
                   show_welcome();
               }
               else
               {
                   show_welcome();
               }
           }
           if(!isset($_REQUEST["welcome_already_seen"]))
                 show_welcome();

                           switch ( $_POST['next_step'] )
                           {

                               case "step5":
                               {
                                   do something
                                   form
                                   next_step = step8;
                                  /form
                               }

                               case "step10":
                               {
                                   do something
                                   form
                                   next_step = step5;
                                    /form
                              }

                           etc...etc
                           } //end switch

           function show_welcome()
           {
                      do something
                       form
                       next_step = step10;
                       /form
             }

The  show_welcome() persists in each step.

How do I make it go away after step10?

Thanks.

Ethan


-- PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



I was going to try and help, but there is not enough info here to know what your doing to try and help.
To ambiguous for me.

My guess is because you have the function being called when welcome_already_seen isset() and if it is not and if there is an error and if not, regardless of what page is being displayed. Put the function call only in the switch statement for each page you want it called and not for 10.

Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux