#Whats the problem
12 messages · Page 1 of 1 (latest)
line 9 to line 8 would not matter, PHP is an interpreted language and does not depend on whitespace it depends on block statements defined with {}. That line of code is already on the same line due to PHP erasing or rather consuming whitespace on the backend
unlike python which depends on whitespace PHP will ignore it all
when you make the post request $_POST is an array of POST values captured from the form, you are indexing it with a key expecting that key or value in the array or rather map to include those three indexed values. If the post form does not have those same exact keys to match input it will fail and then cause the interpreter to error out or output the error when processing the POST request and formatting it onto the HTML document. Check the forms or you can use a process of debugging that checks if the value exists within the map $_POST. My bad, this is a map because the value you are indexing is a key and the result of that POST index for the key is the form matched payload.
extending on this
Here is an example of the whitespace consumer
func (lex *LexerStructure) ConsumeWhiteSpace() {
for lex.Char == ' ' || lex.Char == '\t' || lex.Char == '\n' || lex.Char == '\r' {
lex.ReadChar()
}
}
this is the same for most languages like PHP if you can picture that function written in C
this function will take source code input like
let x = $_POST["hello
"]; try { ECHO ""...};
anc convert it to
let x=$POST["hello"]; try { echo "$x"}
Yeah you're right it looks like PHP throws in an \n when you do it mid-string. In that case, agree it also looks like to me one or both of the two POST values are not in the POST request to the page
hmm