How to display form submitted data without using model and with model
in the same controller
Hi..All,
I am new to cake php i have problem like this



Table:

 CREATE TABLE `user`.`users` (
  `name` VARCHAR( 60 ) NOT NULL
   );

------------------------------------
Step :1
------------------------------------
Model : user.php

<?php
class User extends AppModel
{
    var $name = 'User';

}

?>

Step : 2
------------------------------------
controller : users_controller.php
------------------------------------
<?php
class UsersController extends AppController
{
    var $name = "Users";

    //var $uses=array();
    function testone()
    {
      echo this->data[name];      // this is data base field- 'name'
    }

    function testtwo()
    {
     echo this->data[testname];   // here out pot is not
displayed
    }

}

?>



STEP 3:
----------------------------
View files 1 : testone.ctp
----------------------------
             <?php
                  echo $form->create(null, array('action'
=>'testone'));
                  e($form->text('name');
                  echo $form->submit('TestOneDisp');
                  echo $form->end();
             ?>


----------------------------
View files 2 : testtwo.ctp
----------------------------
             <?php
                  echo $form->create(null, array('action'
=>'testtwo'));
                  e($form->text('testname');
                  echo $form->submit('TestTwoDisp');
                  echo $form->end();
             ?>


Suppose when i am using var $uses =array(); i am getting the testtwo
output, but not getting the testone out put. if leave the  var
$uses=array() i am getting the testone output but not getting the
testtwo output. so please help me out. i have to display both results
in the same controller.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to