Ciao, ho un form in cui c'è un ciclo while che estrai dati da un database;
vengono estratti 10 record alla volta ma il pulsante di submit vede solo
l'ultimo (il decimo), come faccio a fargli vedere tutti i 10 record in una
volta? Grazie
Questo è il form:
vengono estratti 10 record alla volta ma il pulsante di submit vede solo
l'ultimo (il decimo), come faccio a fargli vedere tutti i 10 record in una
volta? Grazie
Questo è il form:
PHP:
<table border="0" cellpadding="5" cellspacing="0" align="center"
width="90%">
<form action="validate.php" method="post">
<?
$sites=0;
$get_sites=mysql_query("SELECT * FROM records WHERE status = '1' ORDER BY
data DESC LIMIT 0,10");
while($get_rows=@mysql_fetch_array($get_sites)){
$sites++;
?>
<input type="hidden" value="<? echo $get_rows[id];?>" name="id">
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Inviato
il:</font></td>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">
<input name="data" size="10" value="<? echo
$get_rows[data];?>"> alle ore
<input name="ora" size="8" value="<? echo
$get_rows[ora];?>"> da
<input name="ip" size="12" value="<? echo $get_rows[ip];?>"></font>
</td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>"
size="2">Privacy:</font></td>
<td bgcolor="#eeeeee"><input name="privacy" size="2" value="<? echo
$get_rows[privacy];?>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>"
size="2">Newsletter:</font></td>
<td bgcolor="#eeeeee"><input name="newsletter" size="2" value="<? echo
$get_rows[newsletter];?>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Titolo
Sito:</font></td>
<td bgcolor="#eeeeee"><input name="titolo" size="35" value="<? echo
$get_rows[titolo];?>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Indirizzo
Sito:</font></td>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">
<input name="url" size="35" value="<? echo $get_rows[url];?>">
<a href="<? echo $get_rows[url];?>" target="_blank">Controlla il
Sito</a></font></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>"
size="2">E-Mail:</font></td>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">
<input name="email" size="35" value="<? echo $get_rows[email];?>">
<a href="mailto:<? echo $get_rows[email];?>">Invia un
E-Mail</a></font></td>
</tr>
<tr>
<td valign="top" bgcolor="#eeeeee"><font face="<? echo $font_face;?>"
size="2">Descrizione Sito:</font></td>
<td bgcolor="#eeeeee"><textarea cols="35" name="descrizione" rows="3"
wrap="virtual"><? echo $get_rows[descrizione];?></textarea></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Indirizzo
Banner:</font></td>
<td bgcolor="#eeeeee"><input name="urlbanner" size="48" value="<? echo
$get_rows[urlbanner];?>"></td>
</tr>
<tr>
<td valign="top" bgcolor="#EEEEEE"><font face="<? echo $font_face;?>"
size="2">Banner:</font></td>
<td bgcolor="#eeeeee"><img src="<? echo $get_rows[urlbanner];?>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Parole
Chiave:</font></td>
<td bgcolor="#eeeeee"><input name="parolechiave" size="35" value="<? echo
$get_rows[parolechiave];?>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee"><font face="<? echo $font_face;?>" size="2">Priorità
Ricerca:</font></td>
<td bgcolor="#eeeeee"><SELECT NAME="priority" SIZE="1">
<OPTION VALUE="1">Elevata (Siti GP)</OPTION>
<OPTION VALUE="2" SELECTED>Standard</OPTION>
<OPTION VALUE="3">Bassa</OPTION>
</SELECT></td>
</tr>
<tr>
<td colspan="2" bgcolor="#eeeeee" align="center">
<select size="1" name="AddSite">
<option value="I" selected>Seleziona</option>
<option value="Y">Aggiungi il Sito</option>
<option value="N">Cancella il Sito</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?
}
if($sites==0){
?>
<tr>
<td bgcolor="#eeeeee" align="center"><br><font face="<? echo $font_face;?>"
size="2">Non ci sono siti da inserire.</font><br><br></td>
</tr>
<?
} else {
?>
<tr>
<TD bgcolor="#eeeeee">
<?
$Sitidacontrollare = mysql_query("SELECT * FROM records WHERE status =
'1'",$db);
$Siti = mysql_num_rows($Sitidacontrollare);
echo "<font face=\"$font_face\" size=\"2\"><B>$Siti</B> Siti da
controllare in attesa</FONT>";
?>
</TD>
<td bgcolor="#eeeeee" align="right><input name="submit" type="submit"
value="Continua"></td>
</tr>
</form>
<?
}
?>
</table>