Skip to content

Instantly share code, notes, and snippets.

@aikchun
Last active August 29, 2015 13:57
Show Gist options
  • Save aikchun/9636588 to your computer and use it in GitHub Desktop.
Save aikchun/9636588 to your computer and use it in GitHub Desktop.

Revisions

  1. aikchun revised this gist Mar 19, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,9 @@
    $this->set('data', $data);
    }

    public function result() {
    /**
    * in HashResult controller
    */
    public function inputPlaintext() {
    // how do I access $data.
    }
  2. aikchun created this gist Mar 19, 2014.
    20 changes: 20 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    public function view() {
    if($this->request->is('post')) {
    $data = $this->request->data['HashAlgorithm'];
    $this->log($data);
    $this->redirect(array('controller' => 'HashResults' ,'action' => 'inputPlaintext', $data));

    }
    $conditions = array(
    'fields' => array('name'),
    'order' => array('name ASC')
    );

    $this->Session->destroy();
    $data = $this->HashAlgorithm->find('all', $conditions);
    $this->set('data', $data);
    }

    public function result() {
    // how do I access $data.
    }