[PHP] Validation function doesn't work (sort of...)

2003-05-27 Thread Jason Lange
Hello all, I've created this nice validation function which compares a submitted username and password to an array of acceptable values. However, at the moment it will only match the *last* key in the array. Even when I /*know*/ that I typed in the correct values (typed them in Notepad and cop

[PHP] Running PHP 4 & PHP 5 Simultaneously

2003-03-07 Thread Jason Lange
Greetings! I was wondering if it is possible to run both PHP 4 and PHP 5 simultaneously under Apache 2.0.43 on Windows XP Home. I currently have PHP 4.3.0 (SAPI) running successfully under it, but would like to add PHP 5-dev for experimenting. What I'd like to do is allow PHP 4 files to have a

Re: [PHP] restating plea for help with sort

2003-02-27 Thread Jason Lange
Try this code (tested): <-- Begin Code --> foreach ($list as $key => $value) { // If elements value is a numeral add to numeric_array if (is_numeric($value)) { $numeric_array[$key] = $value; // If value is not a numeral (presumably 'n/a') add to na_array } e

Re: [PHP] PHP_SELF syntax

2003-02-24 Thread Jason Lange
What you might try is removing the single-quotes from around PHP_SELF. Before: $_SERVER['PHP_SELF'] After: $_SERVER[PHP_SELF] Another note: as far as I can tell you do not need the braces ({}) to enclose a variable within a double-quoted string. I may be wrong, but nothing I've read advocates d