JHtmlForm/token: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Displays a hidden token field to reduce the risk of CSRF exploits
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHtmlForm/token|E... |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
Displays a hidden token field to reduce the risk of CSRF exploits | Displays a hidden token field to reduce the risk of CSRF exploits | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 28: | Line 26: | ||
</source> | </source> | ||
<! removed transcluded page call, red link never existed > | |||
< | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=token | category=token | ||
category=JHtmlForm | category=JHtmlForm | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API16]] | |||
Latest revision as of 01:45, 25 March 2017
Description
Displays a hidden token field to reduce the risk of CSRF exploits
<! removed transcluded page call, red link never existed >
Syntax
static token()
Returns
void
Defined in
libraries/joomla/html/html/form.php
Importing
jimport( 'joomla.html.html.form' );
Source Body
public static function token()
{
return '<input type="hidden" name="'.JUtility::getToken().'" value="1" />';
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples