The code below is the submission of my form and the inclusion of different
pages based on what the $dev value is.

 

My questions are;

Is there a better, or should I say more elegant, way to do what I'm doing?

Should I break out the switch statement and put it in another page?

What is the suggested limit, for clarity of reading and maintaining, for the
number of pages included in a single page?

 

My goal is to make this extremely easy to edit and maintain.  If I can make
a single change in one page that can affect many other pages I should break
up the pages, shouldn't I?

 

Sorry for the bombardment of questions.

 

[code]

<td align="left" valign="top"><form action="create_lesson.php?dev=<?=$dev?>"
method="post" name="frmCreateLesson" class="normal_text"
id="frmCreateLesson">

<? 

switch($_GET['dev']){

case 1:

                        include('create_lsn_name.php');

                        $dev = 2;

                        break;

            case 2:

                        include('create_lsn_obj.php');

                        $dev = 3;

                        break;

            case 3:

                        include('create_gain.php');

                        $dev = 4;

                        break;

            case 4:

                        include('lsn_layout.php');

                        $dev = 5;

                        break;

            case 5:

                        include('dev_lsn_page.php');

                        break;

            default:

                        include('create_lsn_name.php');

                        break;

}

                                                

?>

 [/code]

 

alex hogan

 



****************************************************************** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
****************************************************************** 


Reply via email to