passing variable functions from php page to php page
Posted: Mon Sep 16, 2002 2:42 pm
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);
}
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);
}