editable option list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kindermaxiz@yahoo.com

    editable option list

    hey yall,

    I fill a list of option from a mysql table

    $resultprod = mysql_query ("describe my_table");
    while($row = mysql_fetcharra y($resultprod)) {
    echo ('<option value="' . $row['Field'] . '">' . $row['Field'] .
    '</option>');
    }
    echo "</select>";
    }

    but I would also like the user to be able to add it´s own value if the
    value he/she want to enter is not in the mysql table. how can I do
    that?

    thanx in advance

    Pat
  • Junior Carioca

    #2
    Re: editable option list

    kindermaxiz@yah oo.com wrote:[color=blue]
    > hey yall,
    >
    > I fill a list of option from a mysql table
    >
    > $resultprod = mysql_query ("describe my_table");
    > while($row = mysql_fetcharra y($resultprod)) {
    > echo ('<option value="' . $row['Field'] . '">' . $row['Field'] .
    > '</option>');
    > }
    > echo "</select>";
    > }
    >
    > but I would also like the user to be able to add it´s own value if the
    > value he/she want to enter is not in the mysql table. how can I do
    > that?
    >
    > thanx in advance
    >
    > Pat[/color]

    Use a textbox. Check in the script if it is filled and save it to db.

    Comment

    Working...