RE: [PHP] 'Code Snippets' you couldn't live without

2004-11-03 Thread Jason Davis
this is not a code "snippet" just a class that i have re-used about a 100 times. It is for authenticating users via a passwd file or mysql. Hope it will help someone ... also , if you improve it please email me the changes :) http://mohadib.openactive.org/web_editor/AuthTool.class.php.txt

Re: [PHP] problem with include()

2004-11-01 Thread Jason Davis
On Mon, 2004-11-01 at 16:26, Brad Dameron wrote: > On Mon, 2004-11-01 at 15:17, Jason Davis wrote: > > sc.php > > > setCookie('data' , 'blah'); > > include 'gc.php'; > > ?> > > > > gc.php > > > print $_CO

Re: [PHP] problem with include()

2004-11-01 Thread Jason Davis
On Mon, 2004-11-01 at 16:10, Vail, Warren wrote: > How did you go to the page that included the login page, if you included it > in the tiny_edit.php (which is the routine that sets the cookie in the > browser, you need to cause the browser to send it back to you by doing a > redirect; > > Header(

Re: [PHP] problem with include()

2004-11-01 Thread Jason Davis
On Mon, 2004-11-01 at 16:08, Richard Davey wrote: > Hello Jason, > > Monday, November 1, 2004, 10:34:16 PM, you wrote: > > JD> the login page is included ... the login page does not see the auth > JD> cookie until the user refreshes their browser ... why is this happening? > > Cookies (set via s

[PHP] problem with include()

2004-11-01 Thread Jason Davis
Hello, I have a login page .. the user types in user and pass then the form gets posted to tiny_edit.php tiny_edit.php checks user and pass then sets a cookie if auth is successful. Then the original login page is included. The login page has logic at the top to check for the auth cookie ..

[PHP] gpg/php problems ....

2004-06-08 Thread Jason Davis
the code below encrypts a phrase using gpg and sends out via email ... i get the data ok ... but my mail client does not show it ... if i "view email sorce" i can see the encrypted message ... what am i doing wrong? thanks, jd $username = "mohadib"; $pgp="/usr/bin/gpg"; $u