How can I use a textarea to create an array in a post variable? I want to be able to enter multible emails into a textarea and then submit the values to the action page as an array to be run in a SQL statment. Any is much appreciated.
It's not something that can be done directly with the textarea. You need a server-side technology to break down the submitted string in the POST field. Most programming languages have a function that splits up a string. For example, to split by line in PHP: $values = explode("\n", $_POST['email_addresses']); Code (markup): substitute whatever delimiting character you want into the first argument. Or you can use split() or preg_split() to split on regex if you want to support multiple delimiters.
Thank you for the response. I use coldfusion for my server script so i will do some more searching on how to create an array, I know that I can create an array by using <cfset my_array_name = ArrayNew[1]> Code (markup): Then I think I can maybe do: <cfset my_array_name = #form.textarea_name#> Code (markup): not sure if this is going to break apart the data in the textarea though... I have to do some more searching though, thanks again.