my error function reads the file so dat i could have changed a specific error comment to the generate error using a str_replace(). Now that i have to include the file what is my substitute option.
here is an exxample of my error code
$file = "register.php";
if (($First_Name && $Last_Name) == "")
{
$Replacement = "<!--Name Error-->";
$Error = "Please Enter Your Name!";
ErrorForm($Replacement,$Error,&$file);
exit;
}
function ErrorForm($Replacement,$Errors,&$file)
{
$file = include($file);
str_replace($Replacement,$Errors,$file);
}
passing variable functions from php page to php page
Moderator: General Moderators
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
actually now
Its not.... well not suppose to have been but if you find it works for you....you're welcome. what i was saying is that because i was include() the file instead of fread() i could not do the str_replace(). i ended up having to so some if statements instead. A bit more untidy but got the job done
any suggestions
any suggestions