[PHP] PHP Security

2001-09-13 Thread Allen May

I have been using the .htpasswd/.htaccess convention to authenticate our
3000 employees.
I want to move away from the .htpasswd/.htaccess convention and use a PHP
form to authenticate against the database.

I can create the PHP authentication page, no problem, but how do I check
authentication on the thousands of HTML pages I already have on the site?
For several reasons I don't want to do cookies. Can I set a session variable
in the PHP and conditionally check it with Javascript, if fail go to PHP
authentication form?

What is the javascript session variable function?

Thanks

-Allen


-- 
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]




[PHP] Sort a an array?

2001-08-16 Thread Allen May

I want to sort a result set from a mySQL query (see code below).
I can't figure out how to properly sort the $result in the while loop.

I just want to alphabatize the search result.

Any suggestions how to do this?

Thanks

-Allen
[EMAIL PROTECTED] (remove _nospam to reply)

*

$query = select * from $table;
$result = mysql_query($query);

print form name=\JobDesc\ method=\post\ action=\jobdesc.php\\n;

print select name=\wilber\\n;
while ($row = mysql_fetch_array($result)) :
   print option value=\;
   print $row[Jobtitle];
   print \;
   print $row[Jobtitle];
   print /option\n;
endwhile;



[PHP] Select case equivelent

2001-04-04 Thread Allen May

I have a list of conditions I want to test against. 
In ASP, I would do:

Select Case foo
case "bar1"
foobar = "fooey"
case "bar2"
foobar = "fooey2"
case "bar3"
foobar = "fooey3"
case else
foobar = "NoBar"
End Select

How do I do the equivelent in PHP?

Thanks

-Allen
[EMAIL PROTECTED]


-- 
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]