need some help with form
hi im kind new to codes and im starting get confused ,
how can i get the option selected and send at end of message of form on that code?
if option selected is "<OPTION value="firstname.lastname@example.org" >test Card</OPTION>" this fomr will send a email to that value ,but i want but put at end of "menssage_txt" or at end of email that a text like this "option selected was test card". :confused:
<td colspan="2">Select the area:
<OPTION value="email@example.com" selected>SAC</OPTION>
<OPTION value="firstname.lastname@example.org" >test Card</OPTION>
<OPTION value="email@example.com" >Comercial</OPTION>
<OPTION value="firstname.lastname@example.org" >Diretoria</OPTION>
<OPTION value="email@example.com" >Financeiro</OPTION>
<OPTION value="firstname.lastname@example.org" >Informática</OPTION>
<OPTION value="email@example.com, firstname.lastname@example.org, Jordan@test.com" >Jurídico</OPTION>
<OPTION value="email@example.com" >Marketing</OPTION>
<OPTION value="firstname.lastname@example.org" >RH</OPTION>
<td colspan="2">leave a text here.</td>
<td colspan="2"><textarea name="dSac[menssage_txt]" cols="75" rows="5" wrap="off"></textarea></td>
<td width="80"> </td>
<td><input type="Submit" value=" Enviar " /></td>
Not quite sure what you are after but the select name value will be set to the value of the selected option. Are you using a scripting language after the form is submitted?
For example in php it would be something like
$email_text = mysql_real_escape_string($_POST[dSac['emailto_txt]']);
If this is for a "real world" application, are you sure you want to expose email addresses in your html?
Email address harvesters (bots) will swallow those up very quickly and say "YiuUUuumy - thank you very much".
Why not have some other values like company names, or whatever, as the option values and then when the selected option is sent to your server side form processing script you can get the associated email address for the selected option from a database, array, text file or whatever and then send the email with its message to the email address.
it will be a intranet service that im testing for now i dont have the rights to use the sql to put that in ,so i cant make any big changes
Originally Posted by bullant