forms must have REQUEST_TOKEN
1. April 2013
Frontend-Modul
<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
Backend-Modul
<input type="hidden" name="REQUEST_TOKEN" value="<?php echo REQUEST_TOKEN; ?>">
use contao validator
1. April 2013
$booleanVar = Validator::isEmail('email'); $booleanVar = Validator::isURL('url');
http://www.contao-docs.org/docs/Contao/html/_validator_8php_source.html
get $_GET and $_POST variable
1. April 2013
$variable = Input::get('variable'); $variable = Input::post('variable');
contao database
1. April 2013
uncached database query
$entries = $this->Database->query("SELECT * FROM table WHERE id=$id"); while ($entries->next()) { $entry = $entries->row(); }
cached database query with prepare statement
$entries = $this->Database->prepare("SELECT * FROM table WHERE email=?") ->execute($email); if($entries->numRows) { while ($entries->next()) { $entry = $entries->row(); } }