$talkback_obj = new Talkback();

$talkback_obj->setAuthor($author);
$talkback_obj->setBody($talkback);
$talkback_obj->save();

On Tue, Mar 17, 2009 at 4:10 PM, Liran Tal <liran....@gmail.com> wrote:

>
>
> Hey,
>
> In my template for showSuccess.php I've added the ability to submit a
> form via Ajax
> as follows:
>                <div id="talkback_list"></div>
>                <?php echo form_remote_tag(array(
>                                'update'   => 'talkback_list',
>                                'url'      => 'talkback/addNewTalkbackAjax',
>                                ))
>                ?>
>                <label for="Author">Author:</label>
>                <?php echo input_tag('author') ?>
>                <label for="Talkback">Talkback:</label>
>                <?php echo input_tag('talkback') ?>
>                <?php echo submit_tag('Post') ?>
>                </form>
>
> And in the talkback module's actions I've added an execution handler
> for it, such as:
>
>  public function executeAddNewTalkbackAjax($request)
>  {
>          $isAjax = $this->getRequest()->isXmlHttpRequest();
>          if ($isAjax) {
>                  $author = $request->getParameter('author');
>                  $talkback = $request->getParameter('talkback');
>
>                 .... save(); ...
>
>          }
>  }
>
>
> My question is how to save this data (author and talkback) in the
> table from this execution
> handler?
>
>
> Reference: related schema:
>  talkback:
>    _attributes:  { phpName: Talkback }
>    id:           ~
>    blog_id:   ~
>    author:       varchar(250)
>    body:         longvarchar
>    created_at:   ~
> >
>

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

Reply via email to