Created
January 16, 2017 11:57
-
-
Save skerbis/b2877b1a725f9b59f42b4e023e17a54d to your computer and use it in GitHub Desktop.
REDAXO yForm - YORM:: Erstellen eines Datensatzes mittels Yorm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Neuen Datensatz initialisieren | |
$post = rex_yform_manager_dataset::create('rex_blog_post'); | |
// z.B.: Feld title befüllen | |
$post->title = 'REDAXO-Tag in Wackershofen (am Grundbach)'; | |
// z.B.: Feld Text befüllen ... | |
post->text = '...'; | |
// Speichern des Datensatzes | |
if ($post->save()) | |
{ | |
echo 'Gespeichert!'; | |
} | |
// Wenn Fehler aufgetreten werden ggf. Validierungsmeldungen des Table Managers ausgegeben | |
else | |
{ | |
echo implode('<br>', $post->getMessages()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment