下面是我当前拥有的代码,它正在通过week_num传递。 我正在使用session_start()在页面之间传递变量。

print'<form action="changeplayer_2.php" method="post">';

print"<select name='Week_select'> <br>";

while ($wrow=mysql_fetch_array($wresult)){ 
     print '<option value="'.$wrow['week_num'].'">'.'week '.$wrow['week_num'].' 
     '.$wrow['week_name'].'</option><br>\n';    
}

print "</select><br><br>";

我很好奇的是,我是否也可以将week_name传递给下一页。 请记住,我仍然是初学者,因此,如果您能告诉我有关修复的原因/方式,我将不胜感激。

我努力了

print '<option value="'.$wrow['week_num,week_name'].'">'.'week '.$wrow['week_num'].'     '.$wrow['week_name'].'</option><br>\n';

print '<option value="'.$wrow['week_num','week_name'].'">'.'week '.$wrow['week_num'].'     '.$wrow['week_name'].'</option><br>\n';

两者都会产生错误

===============>>#1 票数:1 已采纳

尝试以下串联:

print '<option value="'.$wrow['week_num'].'_'.$wrow['week_name'].'">'.'week '.$wrow['week_num'].'     '.$wrow['week_name'].'</option><br>\n';

  ask by Bill Flippen translate from so

未解决问题?本站智能推荐:

关注微信公众号