You are here: Re: edit $variable online? « PHP « IT news, forums, messages
Re: edit $variable online?

Posted by "Mark Rees" on 08/17/05 11:28

"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.
>

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация