Re: [PHP] storing passwords in $_SESSION

2005-10-10 Thread Emil Novak
Yet another unsafe way... You can try to write a program that reads
stored cookies in Temporary Internet Files - it's peace of cake for
somebody that is advanced programmer. The best way is to eliminate
lazy users - you simply do not implement auto login. It's the
fastest, safest and the easiest way to solve the problem.

Emil NOVAK
LAMP Developer

On 10/10/05, Dan Brow [EMAIL PROTECTED] wrote:
 Well, um. ya. Back to the drawing board.  Save it in a cookie?

 On Mon, 2005-10-10 at 14:59 -0400, Kilbride, James wrote:
  If the session expired.. how will session hold their user id??
 
   -Original Message-
   From: Dan Brow [mailto:[EMAIL PROTECTED]
   Sent: Monday, October 10, 2005 3:05 PM
   To: PHP-Users
   Subject: Re: [PHP] storing passwords in $_SESSION
  
   Thanks, figured that would be the case. Can't for life of me
   think why I wanted to do that, must have had a brain
   infarction. I want to have an expired session prompt so
   people can log back in with out having to start at the login
   page. Would having the users login saved in $_SESSION be
   alright? prompt them for their password and compare it with
   the password in the DB be fine? I want to reduce the amount
   of typing someone has to do when a session expires.
  
   Thanks.
  
   --
   PHP General Mailing List (http://www.php.net/) To
   unsubscribe, visit: http://www.php.net/unsub.php
  
  

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



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



Re: [PHP] storing passwords in $_SESSION

2005-10-10 Thread Emil Novak
Oh, just username... That's good idea.

Emil NOVAK
LAMP Developer

On 10/10/05, Dan Brow [EMAIL PROTECTED] wrote:
 I was meaning just the username, not the password, still the same issue?

 On Mon, 2005-10-10 at 21:35 +0200, Emil Novak wrote:
  Yet another unsafe way... You can try to write a program that reads
  stored cookies in Temporary Internet Files - it's peace of cake for
  somebody that is advanced programmer. The best way is to eliminate
  lazy users - you simply do not implement auto login. It's the
  fastest, safest and the easiest way to solve the problem.
 
  Emil NOVAK
  LAMP Developer
 
  On 10/10/05, Dan Brow [EMAIL PROTECTED] wrote:
   Well, um. ya. Back to the drawing board.  Save it in a cookie?
  
   On Mon, 2005-10-10 at 14:59 -0400, Kilbride, James wrote:
If the session expired.. how will session hold their user id??
   
 -Original Message-
 From: Dan Brow [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 10, 2005 3:05 PM
 To: PHP-Users
 Subject: Re: [PHP] storing passwords in $_SESSION

 Thanks, figured that would be the case. Can't for life of me
 think why I wanted to do that, must have had a brain
 infarction. I want to have an expired session prompt so
 people can log back in with out having to start at the login
 page. Would having the users login saved in $_SESSION be
 alright? prompt them for their password and compare it with
 the password in the DB be fine? I want to reduce the amount
 of typing someone has to do when a session expires.

 Thanks.

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


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

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




--
Emil NOVAK, razvijalec distribucije Slonix

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



Re: [PHP] creating a shopping cart.

2005-10-01 Thread Emil Novak
Hi!

The best way is already presented in PHP manual:
http://www.php.net/oop . In this example you create an object, which
you can - naturaly pass over Session, etc.

If you'll use OOP (Object-Oriented Programming), it is preffered in
PHP5 to use OOP5 (OOP for PHP5). You can find details on
http://www.php.net/oop5 .

Emil NOVAK, Slovenia, EU

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



Re: [PHP] Array within array

2005-09-30 Thread Emil Novak
?php
$array_file = file(path/to/file);
foreach($array_file as $line)
{
$e_array = explode(',',$line);
{
// do update on db for each line of array
}
}
?

Like this?

Emil Novak, Slovenia, EU

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



Re: [PHP] Server Time Out

2005-09-30 Thread Emil Novak
?php
set_time_limit(0);
// the rest of the code...
?

That should work!

Emil Novak, Slovenia, EU

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



Re: [PHP] Query - Warning: Cannot modify header information

2005-09-30 Thread Emil Novak
You can simply avoid that by buffering the output:

?php
ob_start();
// your code
// ...
ob_end_flush();
?

or (older versions of PHP):

?php
ob_start();
// your code
// ...
echo ob_get_contents();
?

Emil Novak, Slovenia, EU

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



Re: [PHP] Testing for an empty array (with null values)

2005-09-30 Thread Emil Novak
Better use is empty(), which supports array as parameter:

$test = array();
if(empty($test)) // true
{
// code...
}
else // false
{
}

Emil Novak, Slovenia, EU

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



Re: [PHP] error when open files

2005-09-28 Thread Emil Novak
If this isn't local webserver, you maybe have a problem with
allow_url_fopen:
http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen
 Or if this is on your local server, you can try this: $fp = fopen(/A.zip,
r);
 Your sincerely
Emil NOVAK, Slovenia, EU