0
I want to take the values of a form and pass on another page of my site, but always gives error.
Code where the values are:
<form id="formulario" name="form" action="login.php" method="post" onsubmit="return validacao()"/>
<?php
session_start();
$_SESSION['bairro'] = $_POST['tBairro'];
$_SESSION['rua'] = $_POST['tRua'];
$_SESSION['numero'] = $_POST['tNum'];
$_SESSION['cidade'] = $_POST['tCidade'];
$_SESSION['estado'] = $_POST['tEstado'];
?>
Code where I want to pass the values:
<?php
session_start();
echo '<span>Endereço para a entrega 01: ' . echo $_SESSION['bairro']; '-' . echo $_SESSION['rua']; ',' echo $_SESSION['numero']; . '-' . echo $_SESSION['cidade'] . '/' . echo $_SESSION['estado'];'</span>'
?>
Error:
PHP Parse error: syntax error, unexpected 'echo' (T_ECHO)
What can I do?
Only the first echo is needed, the others are wrong. It is a concatenation and not printing.
– Gabriel Heming