You are here: passing variables to other pages « PHP Programming Language « IT news, forums, messages
passing variables to other pages

Posted by julian maisano on 10/22/20 11:21

As you'll see, I'm a beginner php guy...

What i'm trying to achieve is:

1) List in AllProducts.php a set of products which are stored in a MySql
table. Each product has a picture. Each picture actually is a link to a
articulodetalle.php, where there will be greater pictures in, plus some
detailed text.


Code in AllProducts.php actually works fine:

$query = "SELECT * FROM articulos";
$result = mysql_query($query);
$i=0;
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if($i==$public_numero_de_items_por_fila){ //acá cambia de columna
$i=0;
echo "<TR><TH>";
} else {
echo "<TH>";
}
$i+=1;
//here I set up the link to detallearticulo.php *******
echo '<a href="detallearticulo.php?id_articulo=' . $row['id_articulo']
.. '">';
echo '<img width="150" border="0" src="images/' . $row['id_articulo']
.. '.jpg" >';
echo '</a>';
echo "<br>";
echo "id_articulo :{$row['id_articulo']} <br>";
echo "descripcion :{$row['descripcion']} <br>";
echo "precio : {$row['precio']} <br><br>";
}


***** an example of the the link created (in AllProducts.php )is:

detallearticulo.php?id_articulo=xyz325


The problem i'm having is that I've an empty variable value in
detallearticulo.php

$id_articulo (in detallearticulo.php)should have the variable value
associated with the product (xyz325), but it's empty...

What's happening?
Any advice would be apreciated...

sdos - jm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация