Kod
Undefined index: add
Model:
<?php class Display_Model extends Model { public function __construct() { parent::__construct(); } public function download($post) { 'name'=> $post)); } } ?>
Kontroler:
<?php class Control_Controller extends Controller { public function __construct() { parent::__construct(); $this->profiler = new Profiler; } public function index() { $view = new View('show'); $view->title= "Title"; $user= new Display_Model; $user->download($_POST['add']); $view->render(TRUE); } } ?>
Widok:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> <head> </head> <body> <form name="formz" method="post"> <div id="form"> <input type="text" name="add" /> <input type="submit" value="Send" /> </div> </form> </body> </html>