-1
painted yet another doubt...
I can loop in $_SESSION, like:
I have this code below, looping all the images registered inside the banner table and taking all the images registered in the image field.
<?php
$codigo = $_POST['codigo'];
$imagem = $_POST['imagem'];
$query = mysql_query("SELECT * FROM banner") or die(mysql_error());
while($res = mysql_fetch_array($query)){
?>
<label><img width="100" height="auto" src="../img_banner/<?php echo $res['imagem'];?>" title="<?php echo $res['imagem'];?>"/></label><br /><br />
<?php
}
?>
My question is whether I can do the same thing with $_SESSION, like create a banner-named session and within that session I register the amount of images you want, and pull these images through a loop.
If I have how friends could give me a light on how to execute the code?
Thanks Miguel, but I ask you one more question. When registering new images, would it always create a new name for the registered image and include this new image in the loop automatically? I’m sorry for the abuse, but I was left with this doubt...
– Murilo Cabral
I will edit with the value that
$_SESSION['banners']
would have– Miguel