问题描述:

This question already has an answer here:

  • PHP: “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset”

    19 answers

网友答案:

Well, for starters you're assigning $realFirstName and $realSecondName, but you're using your regex with a variable called $realName which i can't see anywhere else in your code.

You have the same issue when checking $body, as $_POST['body'] isn't anywhere in your form.

Your script gives a lot of undefined variable errors for the same reason.

相关阅读:
Top