RE: Access $HTTP_POST_VARS from class member fucntion

From: Date: Sun, 04 Nov 2001 23:06:00 +0000
Subject: RE: Access $HTTP_POST_VARS from class member fucntion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-73424@lists.php.net to get a copy of this message
try this : class me { var arr_post; function init($par_arr_post) { $this->arr_post=$par_arr_post; } } > -----Original Message----- > From: Daniel Harik [mailto:gatop@hot.ee] > Sent: Sunday, November 04, 2001 8:42 PM > To: php-general@lists.php.net > Subject: Access $HTTP_POST_VARS from class member fucntion > > > Hello > > I have a class called Member, it has member function called > vallidateForm(), i try to pass it a $HTTP_POST_VARS array it > looks like this: > > > clas Member{ > var $HTTP_POST_VARS; > function vallidateForm ($HTTP_POST_VARS){ > echo $HTTP_POST_VARS['frmUsername']; > } > } > > $user = new Member; > if($action=="register"){ > global $HTTP_POST_VARS; > $user->vallidateForm($HTTP_POST_VARS); > }else{ > $user->displayForm(); > } > ?> > > But i can't acces $HTTP_POST_VARS['frmUsername'] within the function > > > Thank You very much > >

« previous php.general (#73424) next »