Saturday, May 29, 2010

Re: Cakephp Sample application

8-)

On Sat, May 29, 2010 at 3:33 AM, John Andersen <j.andersen.lv@gmail.com> wrote:
What version of CakePHP are you using? Version 1.1??
I have no idea whether the .thtml files are valid for CakePHP version
1.2.x or 1.3!
Enjoy,
  John

On May 29, 10:23 am, "Gopinath T.M" <gopi4bre...@gmail.com> wrote:
>     Actually i did a sample application like notes
>
>     This Contain fields called title,description,created_date and
> modified_date
>
>     1. app/views/edit.thtml
>
>     <h1>Edit Note</h1>
>     <form action="<?php echo $form->url('/notes/edit')?>" method="post">
>     <?php echo $form->hidden('Note/id'); ?>
>     <p>
>     Title:
>     <?php echo $form->input('Note/title', array('size' => '40'))?>
>     </p>
>     <p>
>     Body:
>     <?php echo $form->textarea('Note/body') ?>
>     </p>
>     <p>
>     <?php echo $form->submit('Save') ?>
>     </p>
>     </form>
>
>     2. app/views/index.thtml
>
>     <h1>My Notes</h1>
>     <p>
>     <?php echo $html->link('Add Note', '/notes/add') ?>
>     </p>
>     <table>
>     <tr>
>     <th>Id</th>
>     <th>Title</th>
>     <th>Created</th>
>     <th>Modified</th>
>     </tr>
>     <?php foreach ($notes as $note): ?>
>     <tr>
>     <td><?php echo $note['Note']['id']; ?></td>
>     <td>
>     <?php echo $html->link($note['Note']['title'],
> "/notes/view/{$note['Note']['id']}")?>
>     [<?php echo $html->link('Edit',
> "/notes/edit/{$note['Note']['id']}")?>,
>     <?php echo $html->link('Delete', "/notes/delete/{$note['Note']['id']}",
> null, 'Are you sure?')?>]
>     </td>
>
>     <td><?php echo $note['Note']['created']; ?></td>
>     <td><?php echo $note['Note']['modified']; ?></td>
>     </tr>
>     <?php endforeach; ?>
>     </table>
>
>     3. app/views/views.thtml
>
>     <h1><?php echo $data['Note']['title']?></h1>
>     <p><small>
>     Created: <?php echo $data['Note']['created']?>
>     </small></p>
>     <p><?php echo $data['Note']['body']?></p>
>
> My problem is it doesn't getting any error.........but the data doesn't
> getting save to Database.
[snip]

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: