MDN

Go Back   Mambo - Forums Closed for posting > Mambo 4.6 > General Questions

Reply
 
Thread Tools Search this Thread Display Modes
Old September 27th, 2008, 04:43   #1
Gael034
 
Join Date: Sep 2008
Posts: 1
Gael034 is on a distinguished road
Default Id in a selectList

Hi!!

I've made a form with a selectlist. It looks like working correctly but when I submit the content, the column ID is alway '0'... I can not write the id from the item selected on the list.

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;
?>

The #_metro's structur: id, estacion - I'm sur it's nothing but I can not see the problem. Can you help me??

Many thanks
Gael034 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -7. The time now is 08:12.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.