Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » problem with redirect data to an other page

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1128 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    problem with redirect data to an other page Link to this post

    Hi!
    my problem is redirect the content of my query in a different page. in my template I put $doRicerca, I try also con $arra_data but nothig change
    and my function is:

    function doRicerca($data, $form) {    
       
    if(!empty($data['nome']))
    { $form_value = array('Nome' => $data['nome'], 'Tipo' => $data['tipologia']);
        }
        //var_dump($form_value['Nome']);var_dump($form_value['Tipo']);die;
        $array_data = "";
    $records = DB::query('select nome from ricercapollsubmission where tipologia='.$form_value['Tipo'].' limit 0,10 ');
    while ($rec=$records->nextRecord()) {
       if($rec['nome'] != null)
    $array_data .= $rec['nome'].'<br/> ';

    }

       
       return $this->customise($array_data)->renderWith(array('SearchPage_results', 'Page'));

    }

  • bebabeba
    Avatar
    Community Member
    192 Posts

    Re: problem with redirect data to an other page Link to this post

    ok, I solve in this way:

    return $this->customise(array('Link'=>$array_data))->renderWith(array('SearchPage_results', 'Page'));

    and i put $Link in my page.
    Now I want print my data in a div..every data in one div..can you help me?

    if i write

    <div id="dimensione">
        $Link
        </div>
    the data are in the same div

    1128 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.