I'm trying to get the results of a javascript function to send to a PHP file.So I can use it as a PHP variable.
This is the function that I want to use in the PHP file:
function password()
{
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( var i=0; i < 5; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
This is a Prototype (so I'm not worried about security risks)
Thanks.
UPDATE: Could someone please show me how a could submit this as a form?