Salve a tutti..mi sto' sbattendo con sta' impaginazione =P credetemi sto' fondendo
...Vorrei fare in modo che in base alla descrizione mi impagini gli oggetti con quella descrizione e nn tutti come debbo fa'? =(
tnx
Codice PHP:
<?
include 'db.php';

mysql_connect("localhost""root""test") or die("Connessione fallita !");
mysql_select_db("sql140688_1") or die("Selezione del DB fallita !");

$count mysql_query("SELECT COUNT(id) FROM  cimocomputer_negozio");
$res_count mysql_fetch_row($count);

$tot_records $res_count[0];

$per_pagina 3;

$tot_pagine ceil($tot_records $per_pagina);

$pagina_corrente = (!$_GET['page']) ? : (int)$_GET['page'];

$primo = ($pagina_corrente 1) * $per_pagina;

$query_limit mysql_query("SELECT id, categoria, nome_prodotto, cod, prezzo, pezzi, img, descrizione FROM cimocomputer_negozio LIMIT $primo$per_pagina");

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Index</title>
<meta name="generator" content="By CIMO">

</head>
<body>
<table align="center" width="580" height="100%" border="0" cellpadding="0" cellspacing="0" id="TabellaSfondo">
    <tr>
        <td align="center" valign="center" background="immagini/Riquadro_Su.png" width="580" height="84"></td>
    </tr>
    <tr>
        <td align="center" valign="center" background="immagini/Riquadro_Centro.png" width="580" height="100%">
        <?
        
while($results mysql_fetch_array($query_limit))
        {
            if (
$results['pezzi'] > 0)
                
$icona='[img]immagini/Verde.png[/img]';
            else
                
$icona='[img]immagini/Rosso.png[/img]';

            if (
$results['categoria'] == "categoria1")
            {
        
?>
            <table align="center" width="550" border="1" cellpadding="0" cellspacing="2" bordercolor="#000000" id="TabellaProdotto1">
                <tr>
                    <td align="center" valign="center" width="160" height="42"><? echo $results['nome_prodotto']; ?></td>
                    <td align="center" valign="center" width="148" height="42">Prezzo: <? echo $results['prezzo']; ?></td>
                    <td align="center" valign="center" width="162" height="42">Disponibilita': <? echo $icona?>
Pezzi: <? echo $results['pezzi']; ?></td>
                </tr>
                <tr>
                    <td align="center" valign="top" width="160" height="198">[img]<? echo $pathImg?><? echo $results['img']; ?>[/img]


                    <?
                    
if ($results['pezzi'] > 0)
                    {
                    
?>
                        <form id="Form1" name="Form1" action="Carrello.php" method="post" onsubmit="return ValidateForm1(this)">
                            <input type="hidden" name="count" value="1">
                            <input type="hidden" name="nome_prodotto" value="<? echo $results['nome_prodotto']; ?>">
                            <input type="hidden" name="cod" value="<? echo $results['cod']; ?>">
                            <input type="hidden" name="prezzo" value="<? echo $results['prezzo']; ?>">
                            <input id="Editbox1" type="text" name="quantita" value="">
                            <input type="image" name="submit" src="immagini/AggiungiAlCarrello.png" alt="Clicca qui per pagare con PayPal">
                        </form>
                    <?
                    
}
                    
?>
                    </td>
                    <td align="center" valign="top" colspan="2" height="198">Descrizione:
<? echo $results['descrizione']; ?></td>
                </tr>
            </table>

        <?
            
}
        }
        
?>
        </td>
    </tr>
    <tr>
        <td align="center" valign="center" background="immagini/Riquadro_Giu.png" width="580" height="82">
        <?
        $paginazione 
"Pagina: [";
        for(
$i 1$i <= $tot_pagine$i++)
        {
            if(
$i == $pagina_corrente)
            {
                
$paginazione .= $i " ";
            }
            else
            {
                
$paginazione .= "<a href=\"?page=$i\" title=\"Vai alla pagina $i\">$i</a> ";
            }
        }
        
$paginazione .= "]";
        
?>
        <div align="right"><? echo $paginazione?></div>
        </td>
    </tr>
</table>
<?
mysql_close
($connessione);
?>
</body>
</html>