Hi All,

 

I know this may be a bad time..., that whole top posting vs. bottom posting
debate has got me riveted, (especially after getting a monitor full the
other day), but I have a question.

 

I have a page that displays a survey.  11 questions all separated in a
switch statement on a page named "cf_survey.php". (please don't start, it's
how I decided to do it)

 

On each question there is a main question with a choice of 1 to 5 on links,
then a sub question with a text area.

 

The code below works well to check to insure that the users selected a
location from the dropdown in case default.

 

case 1:

 

if(empty($_SESSION['sellocation'])){

$_SESSION['selloction'] = '0';

}

$_SESSION['sellocation'] = $_POST['sellocation'];


if($_SESSION['sellocation'] == '0'){

            $errormsg = true;

            ?>

            <script>

                        redirect('cf_survey.php?cf=0');

            </script>

            <?

}

 

[snip]....

 

<a href="cf_survey.php?cf=1&q1=1">

 

This seems to be where I run into trouble.

 

When the user selects the main question choice and the page reloads I get an
error that the index 'sellocation' is not set.

 

If I change the expression to something like this;

 

if(empty($_SESSION['sellocation'])){

$_SESSION['selloction'] = '0';

}

else{

$_SESSION['sellocation'] = $_POST['sellocation'];


if($_SESSION['sellocation'] == '0'){

                        $errormsg = true;

                        ?>

                        <script>

                                    redirect('cf_survey.php?cf=0');

                        </script>

                        <?        

}

 

I loose the redirect on the drop down.

 

What am I missing?

 

 

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