Re: [PHP] 4.04 -- 4.1.2 incompatible

2002-08-20 Thread Douglas Winslow

Petre Agenbag wrote:
 My oh my
 OK, can someone help with this one???
 My original Form conatined the following:
 form action=test.php method=POST enctype=multipart/form-data
 bla, bla
 
 
 And then things broke, so, out of curiosity, I removed the enctype=
 part, and now it works/

Another tip you might find useful if you're writing code that outputs a 
FORM that posts to itself, is to echo $PHP_SELF instead of hard-coding 
the target.  If you happen to move your code elsewhere in the future, 
this will save you the time of having to go back and specify a new POST 
target.

drw



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] aaaaaaaaaaaaaaa

2001-10-24 Thread Douglas Winslow

Franco Breciano wrote:

 a


for($i=0;$i13;$i++){echo chr(97+($i?3:0));}


drw



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Daemon with a PHP file

2001-03-21 Thread Douglas Winslow

On Wed, 21 Mar 2001, Renzi, Sebastian wrote:

 Hello my name is Sebastian ,i'm from Argentina ,this is my first
 question in this list.I would like to know how to run a php file every
 day at 8 AM , my intention was to create a cron with the crontab
 command.Something like this ...

 0 8 * * * /home/users/sebas/citas.php3

 but this doesnt work ,do u know how to do this ? ,thanks

Sebastian,

If you have the PHP interpreter installed as a CGI, you can do this:

   0 8 * * * /path/to/php -f /home/users/sebas/citas.php3

Alternatively, you can set the execute bit on your php script and point
out the interpreter on the first line:

   #!/path/to/php -q
   ?
etc.

drw


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Logging out a user

2001-02-26 Thread Douglas Winslow

On Mon, 26 Feb 2001, Chris Aitken wrote:

 Okay, I got a bit of a curley one that I havent been able to solve by
 looking at the archives and in the manual. Its kind of a PHP/Apache
 question.

 I have a system where a user logs in through .htaccess, it queries my
 mysql database, sets a cookie which logs their username and access
 level number.

 What I want to be able to do it this.. Give the option to "Log
 Out"  which will clear the cookie, and also make htaccess re-request a
 login.  Once it logs in again, the current scripts do their thang and
 log the new user in.

 Is there any direction anyone can point me to start looking cause I
 have a feeling im off the track on what im searching for in TFM and in
 TFA.

I've got a setup similar to this, but it doesn't use htaccess for
authentication.  If you send a 401 back at the client, it will void its
cached username/password.  You could do this at the top of your code:

header("WWW-Authenticate: Basic realm=\"stuff\"");
header("HTTP/1.0 401 Unauthorized");
exit;

..if 1) the login cookie is not present, and 2) the user is not currently
logging in (trying to get the cookie) on that hit.

If you want to do it quietly, just unset the cookie and bounce them to
somewhere outside of the realm of your htaccess protection.  Next time
they enter, the cookie will not exist, so they'll be forced to re-login
anyway.

-- 
Douglas R. Winslow III
MetroNet Internet Services, Inc.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]