This is my pizza website page, It is pizza overview page. 当我点击此下拉列表,并选择披萨类型时,页面不会重定向,也不会显示特定的披萨(我在下拉列表中选择的类型),它会显示所有比萨饼,PLZ任何人都可以提供帮助我吗?
这是我的提交按钮代码。
class pizzaController {
function CreatePizzaDropdownList()
{
$pizzaModel = new PizzaModel();
$result = "<from action = '' method = 'post' width = '200px'>
please select a type:
<select name = 'types'>
<option value = '%'>All</option>
" . $this->CreateOptionValues($pizzaModel->GetPizzaByTypes()).
"</select>
<input type = 'submit' value = 'Search'/>
</form>";
return $result;
}
答案 0 :(得分:1)
你宣布了一个&#39;来自&#39;而不是一种形式的&#39;
变化
$result = "<from action = '' method = 'post' width = '200px'>
到
$result = "<form action = '' method = 'post' width = '200px'>
答案 1 :(得分:0)
将此更改为
$result = "<from action
此
$result = "<form action
以及action = ''
为空
所以最终代码将是
$result = "<form action = '' method = 'post' width = '200px'>
please select a type:
<select name = 'types'>
<option value = '%'>All</option>
". $this->CreateOptionValues($pizzaModel->GetPizzaByTypes())
."</select>
<input type = 'submit' value = 'Search'/>
</form>";
答案 2 :(得分:0)
撰写 template <typename Object>
void node<Object>::set_data(const Object& new_data){
word = new_data;
}
template <typename Object>
void node<Object>::set_link(node<Object>* new_link){
next= new_link;
}
template <typename Object>
void node<Object>::set_previous(node<Object>* new_prev) {
previous = new_prev;
}
template <typename Object>
const Object& node<Object>::data() const{ //return the word
return word;
}
template <typename Object>
const Object& node<Object>::link() const { //return next node (const function)
return next->data();
}
template <typename Object>
const Object& node<Object>::back() const { //return previous node (const)
return previous->data();
}
代替<form action = '' method = 'post' width = '200px'>
修改后的代码:
<from action = '' method = 'post' width = '200px'>