Foreach php function inside HTML select options

前端 未结 5 1971
粉色の甜心
粉色の甜心 2021-01-15 11:18

Im a newbie to this forum and have just started coding in php. Need some help. I have the following code



        
5条回答
  •  清歌不尽
    2021-01-15 11:56

    if (isset($_POST['Submit'])) {
    echo "
    "; echo ($_POST['pty_select']); echo "
    "; } ?>

    Change it to something like

    if(isset($_POST['Submit'])) {
        echo $results_array[$_POST['pty_select']]['profile'];
    }
    

    Or alternatively use profile option value.

提交回复
热议问题