How to get JavaScript vars into PHP vars?

Is there a "correct" way doing this or do I have to trick it transfere JS variables in to some input type=hidden and take it from there?