Do you have an answer for my question?
bedul <[EMAIL PROTECTED]> wrote:
----- Original Message ----- From: "sam rumaizan" <[EMAIL PROTECTED]>
To: <[email protected]>
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.