hi to all

pls help me to store whatever the user enters in text box in a table and then get the records from the table and use it in drop down list.
Any idea or tutorial to do like tat....

This will really depend on whether you can restrict what the user enters into the textarea. You need to decide where you will expect a new item (newline, comma-seperated, space seperated...) and then make sure the user follows the system, but people are known for not reading instructions.

Anyway, the below code should give you some idea of where to start (it is based on new values being on a newline):

<?php
// Get the data from the textarea and remove HTML entities
$textarea = htmlspecialchars($_POST['textarea_name']);

// Split the string up into an array of values
$dropdown_data = explode("\r\n", $textarea);

// Do some database stuff here.

// Output a dropdown
echo '<select name="dropdown_list">';
foreach($dropdown_data as $key => $value) {
  echo '<option value="'.$key.'">'.$value.'</option>';
}
echo '</select>';
?>

That will need adjustments for what you want to do, but it should give you some idea.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.