Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

problem with redirect data to an other page


Go to End


2 Posts   1624 Views

Avatar
bebabeba

Community Member, 193 Posts

27 November 2008 at 11:51pm

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'));

}

Avatar
bebabeba

Community Member, 193 Posts

28 November 2008 at 12:16am

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