Buen día! alguien sería tan amable de explicarme que significa esta parte del código? en especial la parte de header (no se nada de php y esto lo tengo que pasar a js
/*$_usuario = $_POST['usuario'];*/
$_usuario = 'prueba';
if (isset($_POST["enviar"])) {
session_start();
$_SESSION["usuario"] = $_usuario;
$_SESSION["inputNumero"] = htmlentities($_POST["inputNumero"]);
$_SESSION["inputNombre"] = htmlentities($_POST["inputNombre"]);
$_SESSION["inputGenero"] = htmlentities($_POST["inputGenero"]);
header("Location: montos.php");
}
?>
You are not allowed to view links.
You are not allowed to view links.
Register or
Login or You are not allowed to view links.
Register or
Login*.- isset(): https://www.php.net/manual/es/function.isset.php
*.- session_start(): https://www.php.net/manual/es/function.session-start
*.- htmlentities(): https://www.php.net/manual/es/function.htmlentities.php
*.- header(): https://www.php.net/manual/es/function.header
*.- Location header: https://www.rfc-editor.org/rfc/rfc9110#name-location
*.- $_POST: https://www.php.net/manual/en/reserved.variables.post
*.- $_SESSION: https://www.php.net/manual/en/reserved.variables.session
*.- if: https://www.php.net/manual/es/control-structures.if.php
*.- variables: https://www.php.net/manual/es/language.variables.php
~ DtxdF
Increíble respuesta You are not allowed to view links.
You are not allowed to view links.
Register or
Login or You are not allowed to view links.
Register or
Login Independientemente de eso y haciendo petición a la parte en la que hace hincapié:
Citaren especial la parte de header (no se nada de php y esto lo tengo que pasar a js
header("Location: montos.php");Básicamente, redirige a montos.php