Skip to content

Instantly share code, notes, and snippets.

@phproberto
Last active October 1, 2016 07:30
Show Gist options
  • Save phproberto/c08c71ec0c8688a7e387c5d458ea11fe to your computer and use it in GitHub Desktop.
Save phproberto/c08c71ec0c8688a7e387c5d458ea11fe to your computer and use it in GitHub Desktop.
<?php
$app = JFactory::getApplication();
$newId = $app->input->getInt('mid');
$myId = $app->getUserStateFromRequest('phproberto.mid', 'mid');
if ($newId)
{
$url = JUri::getInstance();
$url->delVar('mid');
$app->redirect($url->toString());
}
echo 'Value stored: ' . $myId;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment