Can somebody find out why are the codes below not working inside a blank application. I’m using version 6.
I confirmed that the query works, the redirect app works as well and expects the bannerID parameter.
When I run the application, it’s just blank–no error message. That means the redirect never takes place.
Thanks for your help.
/*
- Determine if user is authenticated and if so query user info.
*/
$check_sql = “SELECT BannerID, firstname, lastname”
. " FROM myTable"
. " WHERE username = ‘johnsmith’ ";
sc_lookup(rs, $check_sql);
if (isset({rs[0][0]})) // Row found
{
{bannerID} = {rs[0][0]};
{firstname} = {rs[0][1]};
{lastname} = {rs[0][2]};
// Redirection parameters
$redir_app = 'showApps'; // Application name
$redir_target = '_blank';
$redir_param = array(
'bannerID' => '{bannerID}',
'firstname' => '{firstname}',
'lastname' => '{lastname}'
);
sc_redir($redir_app, bannerID = '{bannerID}', $redir_target);
}
else // No row found
{
$error_message = ‘Record not found. Please contact the system administrator.’; // Error message
sc_error_message($error_message);
}