1
Guys, I’m making a simple code... I just want to get the information typed in the form. But it doesn’t work, the GET works... the Post doesn’t.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="index.php" method="POST">
Nome: <input type="text" name="nome" value="1">
Idade: <input type="text" name="idade" />
<input type="submit" value="POST"/>
</form>
<?php
$nome = $_POST["nome"];
echo $nome;
?>
</body>
</html>
I’ve tried doing it in a separate file, it didn’t work either, is it something in php.ini? I’m using the XAMP tbm...
Why exactly would this solve the problem? What is the difference between the
PHP_SELF
and put the file name straight? What about the XSS problem?– Woss
Have you tried enabling php.ini errors? display_errors = on
– Espector