Re: ListBox
| From: | sam rumaizan | Date: | Mon, 07 May 2007 05:59:25 +0000 |
| Subject: | Re: ListBox | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27831@lists.php.net to get a copy of this message | ||
Do you have an answer for my question?
bedul <landavia81@gmail.com> wrote:
----- Original Message ----- From: "sam rumaizan" <samcalc@yahoo.com>
To: <php-windows@lists.php.net>
Sent: Saturday, May 05, 2007 12:48 PM
Subject: [PHP-WIN] ListBox
> The code is fine. But I have one problem, when the ListBox display the data it gives me extra
> empty lines. How can I get rid of these lines?
>
>
>
> < -------- ListBox Code
> ----------------------------------------------------------------------------------->
> echo"<table border='1' cellspacing='1'
> cellpadding='3' bordercolor= 'CDCB98'>";
> echo'<form name="myform" method="post"
> action="sfd.php">';
> $result = mysql_query('select * from lo_data');
> echo"<tr bgcolor='CDCB98'>";
> echo "<td>" ;
> echo"<select NAME='Cat' onchange='resubmit()'>";
> echo"<option value='NULL'>Select Search Item</option>";
type
echo"<option value='NULL' SELECTED>Select Search Item</option>";
> $i=0;
> while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
> foreach ($line as $col) {
> $field=mysql_field_name($result,$i);
> $array[$field] = $col;
> echo"<OPTION value='$field'";
> echo ">$field</OPTION>";
> $i++;
> }
> }
> echo "</SELECT>";
> echo "</td>";
> echo "</form>";
>
>
>
>
>
>
> ---------------------------------
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.