doulu3399 2018-06-27 16:12
浏览 30

联系表单上的下拉菜单的PHP代码,具有基于选择的特定电子邮件

I am working on a contact form for someone and they want a drop down menu added that based off of what they choose on that menu, is where the form will go.

Example: Drop down Menu options are:

General Inquiry goes to anyone@123.com

Press goes to bored@123.com

Booking goes to help@123.com

I have no idea how to set the PHP up for this.

  • 写回答

1条回答 默认 最新

  • dongyouzhui1969 2018-06-27 16:57
    关注

    better way would be using Javascript and adding an eventlistener on change of the drop down menu where it will take you to the link

    <select id="select">
      <option value="google.com">Google.com</option>
    </select>
    
    <script>
     const select = document.querySelector('#select')
     select.addEventListener('change', (e) => {
       window.location.href = select.value;
    
     }
    </script>
    

    something like this

    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?