You don't "make use" of a JS variable in PHP. This suggests misunderstanding of how the web works.
– elclanrsAug 06 '14 at 17:59
1
JavaScript is run on the client, so you'll need to send it back with AJAX. But, MD5() can be calculated perfectly well by PHP - can you add more context to your question? It is getting downvoted since you haven't evidenced any research, which is pretty much a prerequisite here.
– halferAug 06 '14 at 17:59
Explain what you're really trying to do and you will get the best advice. You almost definitely are taking the wrong approach.
– Wesley MurchAug 06 '14 at 18:00
1
Haven't you posted [this question](http://stackoverflow.com/questions/25159306/how-to-save-this-in-a-js-variable) [multiple times](http://stackoverflow.com/questions/25159035/how-to-save-the-output-and-not-the-code-from-this-js-to-a-php-variable) before?
– admdrewAug 06 '14 at 18:00
Thanks @WesleyMurch, agreed and I retracted my vote before it closed. I think it's [a dup of this](https://stackoverflow.com/questions/25159035/how-to-save-the-output-and-not-the-code-from-this-js-to-a-php-variable) instead, one of the OP's other earlier questions.
– halferAug 06 '14 at 18:07
Can you post an example of your code to give more context? It's hard to make direct comparisons between PHP and JS because they work very differently. (PHP is a server side language and JS is client side.)
– hawkharrisAug 06 '14 at 18:02
@hawkharris: I've not downvoted on your answer, but the reasons for these downvotes are likely that the answer is deemed too trivial, or that the question is clearly off-topic and so the OP should have found out the answer for him/herself. In this case the OP has posted several identical (or very similar) questions, and so it is probably best to just downvote and move on. If you believe a question will close, it's often best not to answer, unless your answer is of such length and quality that it will get upvotes notwithstanding the question's status.
– halferAug 06 '14 at 18:09
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post.
– Deepanshu J bediAug 06 '14 at 18:58
@Fataoulas To find the answer you're looking for, I think you'll have to do a little research on the relationship between PHP and JavaScript. You can't really make a one-to-one comparison because they have fundamentally different uses. This other S.O. post does a good job of explaining the differences. I hope it helps: http://stackoverflow.com/questions/6369313/difference-between-javascript-and-php
– hawkharrisAug 08 '14 at 13:37