-1
我试图根据用户从下拉列表中选择的选项获取不同的值。 例如。当用户从下拉菜单中选择选项1 =>将值111传递给$数字时通过基于不同选择选项的值
我该怎么做?我应该在//一些代码区包含哪些代码?
switch($_POST['outlet']){
case 'a' :
//some code;
//get value 111 from here
break;
case 'b':
//some code;
//get value 222 from here
break;
case 'c':
//some code;
//get value 333 from here
break;
default:
//some code if the post doesn't match anything
}
你为什么不只是值从'select'添加到'option'? '' –