API15

JHTMLForm/token: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 34: Line 34:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=token
  category=token
  category=JHTMLForm
  category=JHTMLForm
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:51, 25 March 2017

Description

Displays a hidden token field to reduce the risk of CSRF exploits

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

token()


Returns

void

Defined in

libraries/joomla/html/html/form.php

Importing

jimport( 'joomla.html.html.form' );

Source Body

function token()
{
        return '<input type="hidden" name="'.JUtility::getToken().'" value="1" />';
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples