Getting data values from form in Fat-Free framework

user2984700 picture user2984700 · May 10, 2014 · Viewed 8.5k times · Source

I'm migrating from codeigniter to Fat-Free (F3) and trying to get my head around the quirks.

Regarding the following form:

<form ACTION = "<?php echo $_SERVER['PHP_SELF'];?>" METHOD="POST">
  <input type="text" name="theirName" value="" required="required">
    ...

In standard PHP I get the POST value like this:

$name = $_POST['theirName'];

Or in codeignitor:

echo form_open('someclass/some_method_of_someclass');
$name = $this->input->post('name');

How do I get data from a form in a view in f3/fatfree?

Answer

Nilam Sari picture Nilam Sari · Jul 3, 2014

You can get it from the Hive:

$name = $f3->get('POST.name');