Re:Re: [PHP] help for me about session

From: Date: Sun, 24 Apr 2005 03:29:14 +0000
Subject: Re:Re: [PHP] help for me about session
Groups: php.general 
Request: Send a blank email to php-general+get-213750@lists.php.net to get a copy of this message
----- Original Message ----- From: Steve Buehler To: Josephson Tracy ;php-mailing-lists Subject: Re: [PHP] help for me about session Sent: Sun Apr 24 10:54:34 CST 2005 > At 09:35 PM 4/23/2005, Josephson Tracy wrote: > > > >hi everyone, > >when i study php, i have a problem as following: > >--------------------- > >file1.php > ><? > >if($NextCourse == 1){ do something;} > >else($NextCourse ==""){do something other } > >?> > >------------------------- > >but when the 2ed access the file1.php > >the value of $NextCourse is the $NextCourse in the <? and ?>, Not the > >value of document.form1.NextCourse.value. > > > >could someone tell me why?thanks > > I believe it should be: > <? > if($NextCourse == 1){ do something; } > elseif(!$NextCourse){ do something other; } > <? > > By the way you have your statement, I think you are only looking for the > "1". You might try the following instead. > <? > if($NextCourse == 1){ > do something; > }else{ > do something else; > } > ?> > ok. the key problem is when I click the button to submit. the value of $NextCourse is not the value of value of document.form1.NextCourse.value. just is the pre page's $NextCourse,that's say "null"; how can i get document.form1.NextCourse.value?

« previous php.general (#213750) next »