PHP code example of flickphp / flick

1. Go to this page and download the library: Download flickphp/flick library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flickphp / flick example snippets


$form = new Flick\Flick([
    'views' => 'bootstrap',   // CSS framework view: flick, bootstrap, bulma, tailwind, ...
]);


m = new Flick\Flick();

// Renders the form, handles submission, and validation
$form->createAndValidate('Name[


m = new Flick\Flick();

// Handle submission
if ($form->submitted()) {
    $data = $form->request('Name[ame, Email, Message|textarea');

$form = new Flick\Flick(['views' => 'tailwind']);
// Also: flick, bootstrap, bootstrap4, bulma, foundation, materialize

$form = new Flick\Flick([
    'honeypot' => 'website_url',
    'views' => 'tailwind',
]);

if ($form->submitted()) {
    $data = $form->request('
        Name[to database, etc.
    }
}

$form->create('Name, Email, Phone, Message|textarea');

if ($form->submitted()) {
    // confirmed compares password against password_confirmation
    $data = $form->request('
        Username[    if ($form->ok()) {
        // $data['password'] is ready to use
    }
}

$form->create('Username, Email, Password|password, Password Confirmation|password');

$form->open('/contact');
$form->text('name', 'Your Name');
$form->email('email', 'Email Address');
$form->select('subject', 'Subject', '', ['General', 'Support', 'Sales']);
$form->textarea('message', 'Message');
$form->submit('Send');
$form->close();