forms must have REQUEST_TOKEN

1. April 2013

0 Kommentare

Frontend-Modul

<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">

Backend-Modul

<input type="hidden" name="REQUEST_TOKEN" value="<?php echo REQUEST_TOKEN; ?>">

¬ geschrieben von 7masod7 in contao

use contao validator

1. April 2013

0 Kommentare

$booleanVar = Validator::isEmail('email');
$booleanVar = Validator::isURL('url');

http://www.contao-docs.org/docs/Contao/html/_validator_8php_source.html

¬ geschrieben von 7masod7 in contao

get $_GET and $_POST variable

1. April 2013

0 Kommentare

$variable = Input::get('variable');
$variable = Input::post('variable');

¬ geschrieben von 7masod7 in contao

contao database

1. April 2013

0 Kommentare

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();
        }
}

¬ geschrieben von 7masod7 in contao

Theme von BenediktRB • Powered by Wordpress • Abonniere den RSS Feed