为什么会出现语法错误。 [英] Why is it getting syntax error.
问题描述
您好,这是我的PHP代码:
<!DOCTYPE html>
< html>
< body>
$ input = $ _POST [value];
函数输入($ input){
if( $ input === TRUE){
echo你好;
}
else {
echo你在说什么?;
};
};
输入($输入);
?>
< form method =postaction =>
< input type =textname =value>
< input type =submit>
< /表格>
< / body>
< / html>
应该这样工作
1.我应该从中获取价值。
2。用if / else语句验证它。
3.打印正确的声明。
但它正在做什么
只有打印和输入框像它一样吼叫s:
你在说什么?
甚至在输入价值之后仍然说同样的事情。
我尝试了什么:
i试图解决但是什么都不对,它一遍又一遍地发生
Hello this is my php code:
<!DOCTYPE html>
<html>
<body>
$input = $_POST["value"];
function input($input) {
if ($input === TRUE){
echo "Hello";
}
else {
echo "What are you saying?";
};
};
input($input);
?>
<form method="post" action="">
<input type="text" name="value">
<input type="submit">
</form>
</body>
</html>
It should work like this
1. It should take value from me.
2. Verify it with if/else statement.
3. Print the correct statement.
but this what it is doing
only printing and input box bellow it like this:
what are you saying?
and even after entering value it is still saying same thing.
What I have tried:
i tried to solve it but nothing goes right it happens over and over again
推荐答案
input =
_POST [value];
函数输入(
_POST["value"];
function input(
输入){
if(
input) {
if (
这篇关于为什么会出现语法错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!