Sending a drop down selection to a self posting form

Hey, I have a self posting form that I have inserted a pull down menu. The email that sends the form values is succesfully sending all the forms data except for the pull down menu selection which I don’t know the syntax to use. Can some one give me a leg up on how to accomplish this? That would be very cool 8)

Here is the array I built for the pull down menu:

[code]$get_contact=tep_db_query(“select tradeshow_name, tradeshow_id from trade_show_list”);
while($contact=tep_db_fetch_array($get_contact)){

 $contact_array[] = array('text' => $contact['tradeshow_name']);
		  }	[/code]

And here is the mailing information tep_mail($email_to,'[email protected]',"Media Application for Press Pass to IMATS" ,"\n\n".$enquiry."\n\n"."Name: ".$HTTP_POST_VARS['name'].' '.$HTTP_POST_VARS['lastname']."\n\n"."Email: ". $HTTP_POST_VARS['email']."\n\n"."Media Type: ".$HTTP_POST_VARS['mediaType']."\n\n"."Media Outlet: ".$HTTP_POST_VARS['outlet']."\n\n"."Professional Title: ".$HTTP_POST_VARS['title']."\n\n"."Company URL: ".$HTTP_POST_VARS['mediaURL']."\n\n"."Phone Number: ".$HTTP_POST_VARS['phone']."\n\n"."number of page views or subscribers: ".$HTTP_POST_VARS['blogStats'], $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']); $messageStack->add('contact', 'Sent');

Appreciate whatever help I can get

PM

[php]$get_contact=tep_db_query(“select tradeshow_name, tradeshow_id from trade_show_list”);
echo"<option value=>Please make a selection";

while($contact=tep_db_fetch_array($get_contact)){
echo"<option value={$contact[‘tradeshow_id’]}>{$contact[‘tradeshow_name’]}";
}
echo “”;[/php];

when you need to call the variable for this it would just be like another posted data
$variable=$_POST[‘mydropdown’];

That helped allot!! I now have the number in the array posting. How would I format this so the tradeshow_name posted instead?

 tep_mail($email_to,'[email protected]',"Media Application for Press Pass to IMATS" ,"\n\n".$enquiry."\n\n"."Name: ".$HTTP_POST_VARS['name'].' '.$HTTP_POST_VARS['lastname']."\n\n"."Email: ". $HTTP_POST_VARS['email']."\n\n"."Media Type: ".$HTTP_POST_VARS['mediaType']."\n\n"."Media Outlet: ".$HTTP_POST_VARS['outlet']."\n\n"."Professional Title: ".$HTTP_POST_VARS['title']."\n\n"."Company URL: ".$HTTP_POST_VARS['mediaURL']."\n\n"."Phone Number: ".$HTTP_POST_VARS['phone']."\n\n"."number of page views or subscribers: ".$HTTP_POST_VARS['blogStats']."n\n". "Show to attend:".$variable=$_POST['mydropdown'],$HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']);

[php]
$variable=strip_tags($_POST[‘mydropdown’]);
$variable=mysql_real_escape_string($variable);
$a=mysql_query(“select tradeshow_name from trade_show_list where tradeshow_id=$variable”);
$b=mysql_fetch_assoc($a);
$tradeshowname="{$b[‘tradeshow_name’])";

tep_mail($email_to,‘[email protected]’,
“Media Application for Press Pass to IMATS” ,"\n\n".$enquiry."\n\n".
“Name: “.$HTTP_POST_VARS[‘name’].’ '.$HTTP_POST_VARS[‘lastname’].”\n\n”.
“Email: “. $HTTP_POST_VARS[‘email’].”\n\n”."Media Type: ".$HTTP_POST_VARS[‘mediaType’].
“\n\n”.“Media Outlet: “.$HTTP_POST_VARS[‘outlet’].”\n\n”.
"Professional Title: ".$HTTP_POST_VARS[‘title’].
“\n\n”.“Company URL: “.$HTTP_POST_VARS[‘mediaURL’].”\n\n”.
“Phone Number: “.$HTTP_POST_VARS[‘phone’].”\n\n”.
"number of page views or subscribers: ".$HTTP_POST_VARS[‘blogStats’].“n\n”.
“Show to attend:”.$tradeshowname,$HTTP_POST_VARS[‘name’], $HTTP_POST_VARS[‘email’]);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service