J
|
Jane 3/6/2008 |
Hi, global $conn; $str = "SELECT SomeValue FROM Mytable ORDER BY SomeValue ASC; $rs = db_query($str,$conn); $data = db_fetch_array($rs); print_r($data); |
F
|
Fanta author 3/7/2008 |
Thank you Jane, I found the mistake and I finally get the data with help of print_r from my table on my screen. <TD class=editshade_lb style="PADDING-LEFT: 10px" width=351><select name="possible[]" id="available" SIZE="30" MULTIPLE WIDTH=512 STYLE="width: 400px" ONDBLCLICK="java script:copyToList1();">
|
F
|
Fanta author 3/7/2008 |
I even try to created another code in function BeforeShowAdd(&$smarty,&$templatefile), a little bit difference than this one before, but I still got the same message: syntax error: unrecognized tag 'html_options' |
F
|
Fanta author 3/7/2008 |
I was gone to Smarty web pages and I download Smarty and I found in his orginal folder plugins function.html_options.php. I look at the the same folder in PHPRunner and it was empty. <?php
|
F
|
Fanta author 3/13/2008 |
After going around the circle I discover where is the problem. function BeforeShowAdd(&$smarty,&$templatefile) |
J
|
Jane 3/14/2008 |
Hi, global $conn; $value = "<select onchange=\"window.location.href=this.options[this.selectedIndex].value;\">"; $str = "SELECT SomeValue FROM Mytable ORDER BY SomeValue ASC; $rs = db_query($str,$conn); while ($data = db_fetch_array($rs)) $value.="<option value=\"".$data["SomeValue"]."\">".$data["SomeValue"]."</option>"; $value.="</select>"; echo $value; |
F
|
Fanta author 3/14/2008 |
Thank's Jane, but I also finally found solution. The code should be something like this: function BeforeShowAdd(&$smarty,&$templatefile) |