Re: Re: edit $variable online?

From: Date: Wed, 17 Aug 2005 16:14:18 +0000
Subject: Re: Re: edit $variable online?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-220767@lists.php.net to get a copy of this message
If I were you I'd have a file just to define those kind of values (ie. config.php), wich would be included as needed. On 8/17/05, Mark Rees <mrees@itsagoodprice.com> wrote: > "Jesús Alain Rodríguez Santos" <wmaster@cfg.jovenclub.cu> wrote in message > > news:1939.192.168.6.60.1124215951.squirrel@correo.cfg.jovenclub.cu... > > Hi, I have in a php page one ($variable = 85), I woud like to change the > > value from this variable online, without any data base, for example ussing > > a form where I can put the new value and it change the value of the > > $variable. > > > > > Do you mean that you have a page like this, for example: > > 1.php > <?php > $variable=85; > if( $variable>85 ){ > do things; > } > ?> > > And you wish to permanently change the value of $variable to 86? > > You could use file rewriting functions to do this. Look in the manual for > fputs, fread, fwrite and their friends. > > If you wish to change the value temporarily for a single user visit > (session), use a session variable to store it. If you wish to change it for > a period of time, then perhaps consider using a class to retrieve the > variable. > > > > > > > > -- > > Este mensaje ha sido analizado por MailScanner > > en busca de virus y otros contenidos peligrosos, > > y se considera que está limpio. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#220767) next »