我无法获得价值目标
if (isset($_POST['Register'])) {
$indexRegValue = $_POST['RegValue']; // value from index page e.g 490
echo '$indexRegValue';
$ipValue = "490";
$lfvalue = 790;
$spvalue = 990;
if ($ip == $indexRegValue) {
$titlevalue = "490";
} else if ($lfvalue === $indexRegValue) {
$title = "790";
} else if ($spvalue === $indexRegValue) {
$titlevalue = "990";
}
}
echo $titlevalue; // value to print
如何检查并获取价值并以html显示
答案 0 :(得分:1)
if (isset($_POST['Register'])) {
$indexRegValue = $_POST['RegValue']; // value from index page e.g 490
echo '$indexRegValue';
$ipValue = "490";
$lfvalue = 790;
$spvalue = 990;
if ($ipValue == $indexRegValue) { // corrected variable
$titlevalue = "490";
}
else if ($lfvalue == $indexRegValue) {
$titlevalue = "790"; // Corrected variable
}
else if ($spvalue == $indexRegValue) { //changes
$titlevalue = "990";
}
}
echo $titlevalue; // value to print
您要检查和打印的变量中有错字
答案 1 :(得分:0)
您在
$ip
中输入错了,而不是od$ipValue
if (isset($_POST['Register'])) {
$indexRegValue = $_POST['RegValue']; // value from index page e.g 490
echo '$indexRegValue';
$ipValue = "490";
$lfvalue = 790;
$spvalue = 990;
if ($ipValue == $indexRegValue) {// your typo mistake
$titlevalue = "490";
} else if ($lfvalue == $indexRegValue) {//changes
$titlevalue = "790";// your typo mistake
} else if ($spvalue == $indexRegValue) {//changes
$titlevalue = "990";
}
}
echo $titlevalue; // value to print