I want to paas some variables through URL but want to hide them so that users do not change the details. I am redirecting from one view to another through a URL;


I want in site users to see index.php?option=com_componentname

Please guide me the way to do so.

Thanks and Regards, Ruchika


Use STATE or SESSION itself directly to pass those values if you don't want to be changeable. Any data in URL can be manually changed. In URL you can only try to obscure data using Router of you component or/and encode them or use some sort of checksum to be sure that data wasn't changed.

Useful links:

| improve this answer | |
  • Thank you for your response Arthur! I will use SEF URLs by router but it will be displayed in the url. I want to use Joomla user state variable , I even tried using but :( . Can you please give me any example of how can i attain this? And session i will keep this as the second option. – user5491 Jul 13 '15 at 12:35
  • Yes. That's why I recommend you to use SESSION to pass those variables from one page to another. You simple can't have and don't have those variables at once. Its technically impossible. – Artur Stępień Jul 13 '15 at 12:37
  • great! thank you so much Arthur for you quick responses :) – user5491 Jul 13 '15 at 12:55
  • Use State is basically session variables just using context. Here you have example docs.joomla.org/How_to_use_user_state_variables – Artur Stępień Jul 13 '15 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy