Basic php process for html -
When using this php process for HTML forms, I get the answer of "Hello," only. Here is a link where I have uploaded the file, it has a problem at my end.blogoi.com php code it self
and html if necessary
change
$ name = $ _POST [ "$ Name"];
to
$ name = $ _POST ["name"];
The dollar sign should not be there
["$ name"] ^ - // delete it
& lt; Add a reporting error above your file immediately after php error_reporting (E_ALL); Ini_set ('display_errors', 1); // The rest of the code
After doing this, there must have also been an error like this:
Notice: Undefined variable: In the name ... (Path of file) To learn more on error reporting on line X
, go to:
In addition, go to the PHP.net website
You can browse through your website where the examples are shown
PHP to start with php forms as forms Not a good way
Footnotes:
In addition to this, you are open for (cross-site scripting).
Use the Filter Filter function:
$ name = filter_var ($ _ POST ['name'], FILTER_SANITIZE_FULL_SPECIAL_CHARS); Equal to call from ENT_QUOTES
set
Edit:
According to Jeremy 1026's comment:
" $ _ POST [" $ name "]
you are basically doing Thanks for the additional comment to improve the answer. $ name = foo; $ _POST ['foo'];
"
Comments
Post a Comment