手始めに、一貫性を保ち、Zend Framework を使用しましょう。
//session_start();
//$_SESSION['prenom'] = $form['prenom']; BECOMES
$session = new Zend_Session_Namespace('name'); //will automatically call session_start if required
$session->prenom = $form->getValue('prenom');//assumes $form is a valid Zend_Form object
//$this->_view->prenom = $_SESSION['prenom']; BECOMES
$this->view->prenom = $session->prenom; //$this->_view isn't a thing as far as I know
//if you are expecting the view variable to work after redirect... it won't
//$this->_redirect('inscription'); MAY BECOME
$this_forward('inscription');//will call new action without resetting the request
ビュースクリプトの場合:
//assumes you are in the correct view script
//when accessing variables passed to the view, use $this
<input type="text" name="prenom" value="<?php
if (isset($this->prenom) {
echo $this->prenom;
}
?> " title="Prenom *" class="small"/>