Hi -
First, let me say this - if this post is seen in any way as an intrusion, please excuse me! It's just that I'm sort of in a bind, and I hope someone here can help.
Here's the deal. I am relaunching my website on Monday and a PHP error has started to appear -- while my programmer has not! I am guessing that this is something very simple that one of you can look at for a moment and spot. The other thought is that someone here in the design end of things mucked with a php file using a Mac and (I understand) that can cause the server not to see hard returns, etc.
Any help would be appreciated!
Anyway - here is the error we're getting on a page called collect.php>>>>
Warning: Missing argument 1 for validate_or_login() in /usr/home/wac/www/html/waclib.php on line 9
-0-0-0-0
Now, here are the first 30 or so lines of code from waclib.php >>>>>>>
<?
Library of common functions for WAC
require("fkslib.php");
Returns a user key, or redirects to an optional login page if user
didn't log in correctly.
function validate_or_login($redirect) {
global $user, $pass, $SERVER_NAME;
if(!(isset($user) and isset($pass))) {
if($redirect) {
header("Location: $redirect");
}
html_die("Did not get a user and/or password");
exit;
}
$result=mysql_query("select k from user where user='$user' and
password='$pass'") or html_die("Couldn't validate '$user': ".mysql_error());
if(mysql_num_rows($result)==0) {
if($redirect) {
header("Location: $redirect");
exit;
}
html_die("Could not log in $user, please try again");
exit;
}
list($key)=mysql_fetch_row($result);
return($key);
}
-0-0-0-0-0
...and here are the first 20 or so lines of code from the page which is displaying the error (collect.php)>>>>
<?
#
Tweakable parameters
#
Maximum number of pictures allowed
$PIC_LIMIT=15;
#
End of tweakable parameters
#
require("waclib.php");
Takes a flag string and a flag to remove, returns the new flag string
function deflag($fs,$target) {
$fa=split(",",$fs);
while($f=array_pop($fa)) {
$f != $target and $fr[]=$f;
}
$fr and $result=join(",",$fr);
return($result);
}
open_database();
session_start();
$k=validate_or_login();