Jump to content

Id from a selectlist


Gael

Recommended Posts

Hi!

 

I would like write in my data base the id of a topic in a SelectList. But it is not working. Alway 0... Here the code:

 

<?php

$estacion = ff_getParam('ff_param_estacion', 0);

$rows = ff_select(

"select id, estacion from #__metro "

);

$flag = 0;

$list = '';

if (!is_null($rows))

foreach ($rows as $row)

if ($row->id==$estacion) {

$flag = 1;

$list .= "1;$row->estacion;$row->id\r\n";

} else

$list .= "0;$row->estacion;$row->id\r\n";

 

if ($flag) return $list;

return "1;Selecciona la estacion;''\r\n".$list;

?>

 

Could you hepl me?? (I hope it's you can undestand my bad english)

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/126048-id-from-a-selectlist/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.