PDA

View Full Version : Security Token in javascript


insaatforumu
06-09-2008, 04:38 PM
i have a search form in .js file. and i have security token problem. i have the following code in my form code in .js file,

document.writeln("<input type=\"hidden\" value=\'$bbuserinfo[securitytoken]\' name=\"securitytoken\"/>);

What is the wrong?

Dismounted
06-10-2008, 09:33 AM
You cannot access PHP variables in JS. You need to call the equivalent variable - in this case, SECURITYTOKEN.