Greetings all,
Please excuse my language (mothertongue being French) and my total lack of skills, I am just beginning 🙂
I would like to get values from a scrollbar
(those you create with a SELECT html command), into a TEXTAREA, without reloading the page?
I will try to explain this further :
I have created a scrollbar and I fill each line with 1 value (City) that I fetch in a database and this works fine
(I have done the connecting etc. of course) :
echo "<select name=ville>
<option selected>-- Chose a City --</option>";
for ($i=0;$i<mysql_num_rows($result);$i++)
{
$tbl=mysql_fetch_row($result);
echo "<option value=\"".$tbl[0]."\">".$tbl[0]."</option>";
}
echo "</select>";
Now, when the user selects one of those Cities in the scrollbar, that it goes in a textarea on a new line in it.
The user should be able to select as many cities as they want.
I will then fetch this textarea and do a SQL request with it.
I have thought about
1. storing those values in a table in memory, then when the TEXTAREA is displayed, use that table to fill it.
2. using a loop to fill it, only problem is that the variables reset upon reload of the page.
Anyone can help, please, cause I am stuck I have no more idea 🙁
Thanks in advance