Form sc_include Contrtol app

I have a form app which is calling a blank app and it does not work. Is something wrong with the below code?
onapplicatoininti
[gvapp] = “binloc_maint.php”;
sc_include(blank_security.php);

setting global variable gvapp then including the blank_security.php app

What do you want to achieve? Useually you use the macro sc_redir to move to another application. Including simply includes the code without calling it.

Here is the code in my control app
If I start with this control app, it works, but trying to include it does not.

// Check for record
echo" [gvlogin]";
echo" [gvapp]";
// sc_exit();
$check_sql = “SELECT sec_login,sec_access FROM sec_table WHERE sec_login = [gvlogin]”
. " and sec_app_name = [gvapp]";
sc_select(rs, $check_sql);

if (false == {rs})
{
// Error while accessing database
echo" Not Authorized for this App 11";
sc_redir(GTEKmenu);
}
elseif ({rs}->EOF)
{
// No record found
echo" Not Authorized for this App 22";
sc_redir(GTEKmenu);
}
else
{
// Record found
echo" here";
{clientName} = $rs->fields[“sec_login”];
{clientacc} = $rs->fields[“sec_access”];
echo" {clienName}";
echo" {clientacc}";
exit();
if ({clientacc} == ‘Y’)
{
sc_redir([gvapp]);
}
else
{
echo" Not Authorized for this App";
sc_redir(GTEKmenu);
}
}