0

I want to do some changes on existing website, working in Microsoft expression Web4. I want to email the chosen value of the dropdownlist , but i can't reach the selected value.

My code below :

<form id="form1" runat="server" action="send.php" method="post">

&nbsp;
<textarea cols="20" name="TextArea1" rows="2">
</textarea> 
<input name="Submit1" type="submit" value="submit" /><br />
<br />
<br />


<asp:DropDownList id="DropDownList5" runat="server" DataSourceID="SqlDataSource1" DataTextField="NAAM" DataValueField="NR" >
</asp:DropDownList>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [NR], [NAAM] FROM [LID]">
</asp:SqlDataSource>

Now I want the selected value from the dropdownlist to php but I can't give my dropdownlist a name?

<?php 
 $to='*****@gmail.com';
 $subject='Inschrijving KRVGB';

 if(isset($_POST['Submit1']) )
 {

    $msg=$_POST['WhatDoITypeHere?'];
    mail($to,$subject,$msg);

 }

Can someone help or explain me what to do? I'm looking for hours..

VDWWD
  • 35,079
  • 22
  • 62
  • 79
  • I removed your email address from the question. But other that that why use webforms and then post to a php page? – VDWWD Jul 27 '18 at 10:31
  • Because i found this example for sending a email from website. This works with a textarea but i don't know how to work with the dropdownlist.. – Dieter Vanslambrouck Jul 27 '18 at 11:37
  • I think it is `$_POST['DropDownList5']`. But i'm not a php programmer. But you can send mail with aspnet also. https://stackoverflow.com/questions/18326738/how-to-send-email-in-asp-net-c-sharp – VDWWD Jul 27 '18 at 11:45
  • Already tried but without success :( – Dieter Vanslambrouck Jul 27 '18 at 12:28

0 Answers0