0

Hey

I want to do something like this:

<script language="javascript">
                function calculatesha()
               {
               var name = document.getElementById("firstname").value;
               var last = document.getElementById("lastname").value;
               var complete = name+last;
               var hash = <?php echo(sha1(?>complete<?php));?>; 
               }
</script>

I hope the code is understood even if it is wrong.

Thanks.

2
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by riahc3
0

You can only do this if you perform an AJAX call from Javascript to PHP. You can stick to Javascript, if you use an encryption package.

0

You can only do this if you perform an AJAX call from Javascript to PHP. You can stick to Javascript, if you use an encryption package.

I hate AJAX so I got a JS library and I am doing it with that.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.