The script I’m using allows you to upload an image and has a Success message on the page.
Instead, I’d like it to re-direct to another page after a successful upload.
Here is part of the file code:
// show success and message
unset($_SESSION['security_token']);
$security_token = randomcode();
$_SESSION['security_token'] = $security_token;
$template = "themes/$user_theme/templates/inner_upload_avatar.htm";
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->tbs_show();
@mysql_close();
die();
} else { // proceed is false - show error msg
$show_notification = 1;
unset($_SESSION['security_token']);
$security_token = randomcode();
$_SESSION['security_token'] = $security_token;
$template = "themes/$user_theme/templates/inner_upload_avatar.htm";
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->tbs_show();
@mysql_close();
die();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// sub functions
function die_with_msg($message) {
$show_notification = 1;
$template = "themes/$user_theme/templates/inner_upload_avatar.htm";
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate("$template");
$TBS->Render = TBS_OUTPUT;
$TBS->tbs_show();
@mysql_close();
die();
}
Can you tell me if this is the section where it creates a successful message?
And if so, can you help me with an example of how to then re-direct (after success) to another page?