Page 1 of 1

"help" error

Posted: Fri Jul 11, 2003 2:49 am
by umoplata
8O help i am new to php and i am getting this error

Warning: Invalid range end in /home/www/docs/handleform.php on line 20

I have written this code and cant seem to get the gist of whats wrong

<?
if (($Array["FirstName"]) AND ($Array["LastName"])) {

$Array["Name"] = $Array["FirstName"] .
" " . $Array["LastName"];
} else {

print ("Please enter your first and last names.<BR>\n");
}

$Pattern = "(http://)?([^[:space:]]+)([[:alnum:]\.,-_?\&=])";
$Replace = "<a href=\"http://\\2\\3\"target=\"_new\">\\2\\3</a>";
$Array["URL"] = eregi_replace($Pattern,$Replace, $Array["URL"]);

print ("Your submission--$Array[URL]--has been recieved!<BR>\n");

?>
//thanks in advance :o

Posted: Fri Jul 11, 2003 3:45 am
by Tubbietoeter
I don't know if "AND" works in the if-clause, try "&&" ...



Else, post all of your code an let us know which one is line 20 ...