"help" error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
umoplata
Forum Newbie
Posts: 4
Joined: Fri Jul 11, 2003 2:49 am

"help" error

Post 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
Tubbietoeter
Forum Contributor
Posts: 149
Joined: Fri Mar 14, 2003 2:41 am
Location: Germany

Post 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 ...
Post Reply