I'm trying to redirect user after he fills information about himself to same page with variable in url success = 1 but it seems that variable is empty or not correct. Form is displayed instead of message when URL is: http://example.com/contact.html?success=1. Can you help me please ? Thank you very much.
PHP:
function formSend(){
if($_POST['submit'] && $ok == 1)
$out1 = "thank you very much";
$_SESSION['thank_you'] = $out1;
header("Location: $_SERVER[REQUEST_URI]?success=1");
exit;
}else{
showForm();
}
SMARTY:
{if $smarty.get.success == 1}
{$smarty.session.thank_you}
{else}
{$showForm} {* Show form when address is http://example.com/contact.html?success=1 *}
{/if}