recuperar dados
Galera, estou com uma duvida é o seguinte. estou montando uma loja virtual e sou meio iniciante estou indo mais estou vendo muitas video aulas etc.. mais eu parei numa parte meio dificil aqui.
Assim, estou na pagina gold.php
ai quero criar uma pagina vermais.php
e ja criei só que quero que quando o cliente clicasse em algum item do gold.php ele teria q ir para vermais.php que seria ?pagina=vermais e pegar os dados la do gold.php que ele clicou. aqui o gold.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include 'php/funcoes.php';
$conecta = new Recordset();
$conecta->conexao();
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
</head>
<body>
<font color="#666666" face="Trebuchet MS, Arial, Helvetica, sans-serif" size="5" ><center>Confira os nossos Golds</font></center>
<table cellpadding="8" cellspacing="5" border="0" width="100%" >
<tr>
<?php
$LoopH = 4;
$res = $conecta->seleciona("SELECT * FROM produtos");
$registro = mysql_num_rows($res);
$i = 1;while($list = mysql_fetch_array($res)){
if($i < $LoopH){
echo '
<td align="Center" Valign="top" bgcolor="#ffffff">
<img src="'.$list['caminho'].$list['foto'].'" width="60" height="60" alt="" /><br />
<font color="#666666" face="Trebuchet MS, Arial, Helvetica, sans-serif" size="3" >'.$list['produto'].'<br />
R$ '.number_format($list['preco'], 2,",", ".").'<br /></font>
<form name="produto" method="POST">
<input type="hidden" name="idproduto" value="'.$list['id'].'">
</form>
<a href="?pagina=vermais"><img src="img/botoes/vermais.png" width="126" height="40" alt="" /></a>
<br />
</td>
';}elseif($i = LoopH) {
echo '
<td align="Center" Valign="top" bgcolor="#ffffff">
<img src="'.$list['caminho'].$list['foto'].'" width="60" height="60" alt="" /><br />
<font color="#666666" face="Trebuchet MS, Arial, Helvetica, sans-serif" size="3" >'.$list['produto'].'<br />
R$ '.number_format($list['preco'], 2,",", ".").'<br /></font>
<form name="produto" method="POST">
<input type="hidden" name="idproduto" value="'.$list['id'].'">
</form>
<a href="?pagina=vermais"><img src="img/botoes/vermais.png" width="126" height="40" alt="" /></a>
<br />
</td>
</tr>
<tr>
';
$i = 0;
}
$i++;
}
?>
</td>
</tr>
</table>
</body>
</html>
e aqui o vermais.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include 'php/funcoes.php';
$conecta = new Recordset();
$conecta->conexao();
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<link rel="stylesheet" type="text/css" href="css/int.css" />
</head>
<body>
<div id="box-vermais" style="float:left">
<div id="img-produto-vermais">
</div>
</div>
<div id="box-produto-nome" style="float:left">
<font color="#333333" size="3px" face="Trebuchet MS, Arial, Helvetica, sans-serif">Nome:
<br />preço<br />
<br />
<div id="comprar">
</div>
<br />
Descrição:<br />
<div id="box-descricao" style=" left:10px; top:20px; width:100; height:50; z-index:1; overflow: auto"><br />
<?php
echo ''.$_SESSION["idproduto"].'';
?>
</div>
<br /><br />
</font>
</div>
</body>
</html>
OBRIGADO ESPERO UMA AJUDA URGENTE!!
Discussão (4)
Carregando comentários...