header

JavaScript, PHP

PHP-JavaScript: header(Location…) x location.href

PHP: Utilizando “header(location…)” <? header("Location:index.php"); ?><? header("Location:index.php"); ?> PHP: Utilizando “header(location…)” com parâmetros <? header("Location:index.php?mensagem=OK"); ?><? header("Location:index.php?mensagem=OK"); ?> JavaScript: Utilizando […]

PHP

PHP: Redirecionamento de página

Sintaxe: header(‘Location: url’); onde url é o endereço do site ou página. <? if (isset($_POST[’enviar’])){ $url = ‘index.php’; header("Location: $url");

Rolar para cima