1
I have this PHP code working,
<?php
include "../conexao.php";
$codigo = $_POST['codigo'];
$nome_marca = $_POST['nome_marca'];
$query = mysql_query("SELECT * FROM marca order by nome_marca")or die(mysql_error());
while($res = mysql_fetch_array($query)){
?>
<ul>
<li><a href="prod_index_marca.php?codmarca=<?php echo $res['codigo'];?>"><?php echo $res['nome_marca'];?></a></li>
<?php
}
?>
</ul>
and which directs the href
to the page according to the code referring to the selected brand.
And the landing page is with this PHP code
<?php
include "../conexao.php";
$codmarca = $_GET['codmarca'];
$query = mysql_query("SELECT * FROM produto WHERE codmarca = '$codmarca'");
while($res = mysql_fetch_array($query)){
$codigo = $_POST['codigo'];
$img01 = $_POST['img01'];
$descricao = $_POST['descricao'];
$titulo = $_POST['titulo'];
$codcategoria = $_POST['codcategoria'];
$codmarca = $_POST['codmarca'];
$preco = $_POST['preco'];
$pagseguro = $_POST['pagseguro'];
$titulo = $_POST['titulo'];
?>
that receives the data via $_GET.
My question is whether you can adapt these codes to work with $_SESSION?
And if so, friends can guide me how to convert them, or even where I can get information on the subject.
Here is my thanks to all, for the attention to my doubt.
remembering that Session is only between the same domain, and today it is not recommended to store a lot of data in Session
– Dorathoto
honestly, does it not... adapting code to get wrong is not a good practice!
– novic