Form input array $_GET comma separated in URL

前端 未结 1 411
被撕碎了的回忆
被撕碎了的回忆 2021-01-25 20:28

I have a form:

in results.php you should:

$g = isset($_GET['genres'])?$_GET['genres']:"";
$genres = explode(",",$g);

i have removed the form completely because the genres are now sent by document.location.href. The .val() function of jquery returns the selected values like expected (imploded by ,)

0 讨论(0)
提交回复
热议问题