i have a program that will display a number of diffferent results
depending on the situation.
one example of the code looks like
<?php if(isset($_SESS ION['cust'])) {
print 'You entered: ' . $_SESSION['cust'] . NL . NL;
} else {
print NL . NL;
}
$customer->AddDataPart("N ew Customer Name: <br>");
$customer->AddInputPart(" cust");
$customer->AddDataPart("< br>");
$customer->AddInputPart(" submit");
$customer->AddInputPart(" reset");
$customer->AddInputPart(" _submit_check") ;
unset($_SESSION['cust']);
session_destroy ();
}
$error = $customer->Output(array (
"Function"=>"di splayForm",
"EndOfLine"=>"\ n"
));
?>
i want to assign this code to a variable (other code will be assigned
to the same variable depending on what if/wlse branch it ends up on.
what is the best way to assign this to a variable in such a way that it
will be understood as php when the variable is called in the final
code? do i need multiple include statements for each possible if/else
outcome?
if so, what is the best way to assign an include page to a variable?
tia...
ps - i'm using a forms class here, hence, the code looks the way it
does.
depending on the situation.
one example of the code looks like
<?php if(isset($_SESS ION['cust'])) {
print 'You entered: ' . $_SESSION['cust'] . NL . NL;
} else {
print NL . NL;
}
$customer->AddDataPart("N ew Customer Name: <br>");
$customer->AddInputPart(" cust");
$customer->AddDataPart("< br>");
$customer->AddInputPart(" submit");
$customer->AddInputPart(" reset");
$customer->AddInputPart(" _submit_check") ;
unset($_SESSION['cust']);
session_destroy ();
}
$error = $customer->Output(array (
"Function"=>"di splayForm",
"EndOfLine"=>"\ n"
));
?>
i want to assign this code to a variable (other code will be assigned
to the same variable depending on what if/wlse branch it ends up on.
what is the best way to assign this to a variable in such a way that it
will be understood as php when the variable is called in the final
code? do i need multiple include statements for each possible if/else
outcome?
if so, what is the best way to assign an include page to a variable?
tia...
ps - i'm using a forms class here, hence, the code looks the way it
does.
Comment