Re: [PHP] php4 / sessions

2002-12-13 Thread Joseph Guhlin
I would set it with $HTTP_SESSION_VARS['client_filter'] = 
$client_filter; Maybe that will work? I think they are trying to get 
people to quit using the session_register? I could be wrong. Anyways, 
take out the session_register and do it like I showed you above. One way 
to see if it is set before setting it is to:

if (!isset($_SESSION['client_filter'])) {
   $_SESSION['client_filter'] = $client_filter;
}

That way it will be set before the rest of the script commences.

Hope this works for you! If not, I'm not sure what the problem is and 
someone else will have to help you.

--Joseph Guhlin 
http://www.josephguhlin.com/
Was I helpful?  Let others know: 
http://svcs.affero.net/rm.php?r=bahwi 



Kevin Porter wrote:

Hi,

I'm trying to get a session variable to work. Here's the code at the start
of my script:

session_name('CLIENTFILTER');
session_start();
session_register( 'client_filter' );

As I understand it, the variable $client_filter should now be available to
me? But I can't see it with either just $client_filter or even
$HTTP_SESSION_VARS['client_filter'].
It's definitely setting a cookie in the browser, but it doesn't seem to be
picking up the variable on subsequent pages.

I'm on PHP 4.0.6 with register_globals turned on. (Apache on Solaris)


Any help greatly appreciated

TIA,

- Kev


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**



 



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




Re: [PHP] real password value

2002-12-13 Thread Joseph Guhlin
The better strategy would be to generate a new random password and 
assign that as the password. MySQL's password function is one-way, 
meaning you can encrypt it, but not decrypt it. The way you test it is 
by taking what the user has entered, along with the salt, and encrypting 
that and seeing if it matches the stored, encrypted password. There is 
no way to decrypt it without brute forcing it.

So just assign a new password and mail it to the user. Hope this helps.


--Joseph Guhlin 
http://www.josephguhlin.com/
Was I helpful?  Let others know: 
http://svcs.affero.net/rm.php?r=bahwi 



empty wrote:

Hi all;

do you know how to decrypt password('xxx'); value?

For example

I have a function that mails password to user's mail address

but
result is here;


User Name: xjunky
Password :1ef781ad7c4b0dc2
Thanks.


I've inserted the password as password('$passw');

and selected as belove

function notify_password($username,$email){
   if (!($conn = db_connect())) return false;
   $result = mysql_query(select email,pass from site_members where User_Name='$username' and email='$email');
   $email = mysql_result($result, 0, email);
   $password=mysql_result($result, 0, pass);
   $from = From: [EMAIL PROTECTED] \r\n;
   $mesg = User Name: $username\r\n
   .Password : $password \r\n
   .Thanks.\r\n;
   if (mail($email, Password Information, $mesg, $from)){
   return true;
   }else{
   return false;
   }

}


how to send the true value of th password?

thanks everybody who cares with it.

 



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