phpDocumentor CoreAPI
FormAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: form_api.php

Source Location: /core/form_api.php

Page Details

Form API for handling tasks necessary to form security and validation.

Security methods are targetted to work with both GET and POST form types, and should allow multiple simultaneous edits of the form to be submitted.

Copyright:  Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
Copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Link:  http://www.mantisbt.org
Uses:  session_api.php
Functions
form_security_field  [line 66]

string form_security_field( string $p_form_name  )

Get a hidden form element containing a generated form security token.

Parameters:
string   $p_form_name:  Form name

API Tags:
Return:  Hidden form element to output


[ Top ]
form_security_param  [line 84]

string form_security_param( string $p_form_name  )

Get a URL parameter containing a generated form security token.

Parameters:
string   $p_form_name:  Form name

API Tags:
Return:  Hidden form element to output


[ Top ]
form_security_purge  [line 152]

void form_security_purge( string $p_form_name  )

Purge form security tokens that are older than 3 days, or used for form validation.

Parameters:
string   $p_form_name:  Form name


[ Top ]
form_security_token  [line 38]

string form_security_token( string $p_form_name  )

Generate a random security token, prefixed by date, store it in the user's session, and then return the string to be used as a form element element with the security token as the value.

Parameters:
string   $p_form_name:  Form name

API Tags:
Return:  Security token string


[ Top ]
form_security_validate  [line 104]

boolean form_security_validate( string $p_form_name  )

Validate the security token for the given form name based on tokens stored in the user's session. While checking stored tokens, any that are more than 3 days old will be purged.

Parameters:
string   $p_form_name:  Form name

API Tags:
Return:  Form is valid


[ Top ]


Documentation generated on Sun, 05 Apr 2009 23:01:14 +0100 by phpDocumentor 1.4.1