I\'m calling these functions from a controller to get the form and the values from the form. My question is, how can I keep the values in the form after a submit fails? I\'ve tr
Before your form, instantiate the object which will receive the $_POST data
$_POST
$userbox = new Userbox;
Then process $_POST data, if there is any:
if(isset($_POST['submit']) && $_POST['submit'] === 'userboxsubmit'){ $userbox->process_post(); }
Then output the form: