cakephp - Cake PHP Update single fields in View - Undefined Variable -


I search for a long time, but I do not find a solution to my problem. This is the case that I have some buttons Those who are integrated into my thoughts and are affected by updating an input field. The problem is that I have warnings, they are unspecified to see the variable I understand why I and others should suppress them, but I am not sure if this is a good solution, is there a better way to solve it? What is the best practice?

Here is my code of file:

   Form- & gt; Input ('name'); Copy $ this- & gt; Form- & gt; Input ('vlanNumber'); Copy $ this- & gt; Form- & gt; Input ('description', array ('value' = & gt; $ description)); Echo $ the-> Form- & gt; Input ('preSharedKey', array ('value' = & gt; $ preSharedKey)); Copy $ this- & gt; Form- & gt; Button ('Generate', array ('name' = & gt; 'generate button')); Now this $ -> gt; Form- & gt; Input ('Customer PeerIp', array ('default' = & gt; 'id_of_default_val', 'value' => $ cusPeerIp));  

The generated buttons affect a new preSharedKey and the uploads of CSV affect the updates of other fields, the relevant code of the controller is:

  public Function Input Data () (if ($ is- & amp;; Request- & gt; ('Post')) {$ post_data = $ this- & gt; Request & gt; Data; if (isset ($ this- & Gt; Request- & gt; Data ['Show'])) {// Click on submit button $ this-> session-> Write ('Configuration', $ post_data); // in session Store these input fields - $ - ( RE ('Action' = & gt; 'showpiece')) ;;} Else if (isset ($----- ['Request'> Data ['Canceled'])) Click on the // // Cancel button Returns to the index site: $ -> this-> redirect (array ('verb' = & gt; index '));} Else if (isset ($ this- & request-> ; Data ['generate button']) {$ set-up> Set (pre-shred ', $ this-> getRandomString (20)); // set a pre-shared key with 30 signals) If (! ($ ----- Data-) and amp; is_uploaded_file ($ this-> Data ['excel'] ['file'] ['tmp_name'])) {$ This-> Import data ($ this- & gt; data ['excel'] ['file'] ['tmp_name']); $ Excel = new excel (); $ Values ​​= $ excel- & gt; GetParams ($ this- & gt; data ['excel'] ['file'] ['tmp_name']); $ This- & gt; Set ('description', $ values ​​['description']); $ This- & gt; Set ('cusPeerIp', $ values ​​['cust_peer']); Return; // it tells the Excel class function} // print_r ($ post_data); // resonance $ post_data ['config'] ['name']; // echo $ this-> Request ['config'] ['task_1']; } $ This- & gt; Set ('description', ''); $ This- & gt; Set ('cusPeerIp', ''); $ This- & gt; Set ('preSharedKey', ''); }  

Can you help me?


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -