English 中文(简体)
重新定位民主力量,使之在泽德框架中具有变数
原标题:Redirecting URL with variable in Zend Framework

何种建议的方法与Zentd Framework中的变量重新定位?

让我们说,我们在控制者中采取这样的行动:

 public function newAction()
    {
        $form = new Form_ApplicationForm();
        if($this->_request->isPost()){
            $data = $_POST;
            if($form->isValid($data)){
                $appModel = new Model_Application();
                $result = $appModel->createApplication($form->getValue( name ),
                    $form->getValue( email ),
                    $form->getValue( comments ));
                if($result){
                    // redirect here 
                }
            }else{
                $form->populate($data);
            }
        }
        $this->view->form = $form;
    }

如果想转而到卢爱阵,那么我可以表明:

"增 编 for your application, your reference is #123"

如何履行这一方向?

可能的话?

$this->_redirect( /application/confirm/ .$result);

如果是的话,将如何使用<代码>(result var?

http://www.ohchr.org。 OR I 认为这将发挥作用:

$this->_redirect( /application/confirm/?id= .$result);

但是,如果是最佳做法,则不肯定吗?

我看到了一些例子,即人们使用<代码>_forward(<>>/code>,换头盔,但《URL》从未有过变化,会产生多种提交文件的问题等。

我看到有人推荐<代码>gotoSimple(),但我不肯定这一点。 尽管如此,如果这种道歉是显而易见的,但我猜测,这是在《世界人权宣言》的类型制度中具有多重用途的,因此有兴趣知道。

增 编

最佳回答
问题回答

不是过于简单,而是你们是否考虑将其放在<编码>_SESSION,然后在下页读?

页: 1

$_SESSION[ foo ] = 10;

第2页

echo htmlspecialchars($_SESSION[ foo ]);




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签