ciao ragazzi
necessito di spostare il form dal codice in questione:

Codice PHP:
echo "</div><div class='testata'><center>[img]user.gif[/img]</img> ";
$inv=0;
if(@file_exists($suff."_hid/$login.txt")){$inv=1;}
if($inv==0)
{$filename = $suff."_online1/$login.txt";
$string = @time();
$a = @fopen("$filename", "w+");
@fputs($a, $string);
@fclose($a);}

$path = $suff."_online1/";
$dir_handle = @opendir($path);
while ($file = readdir($dir_handle))
    {
        if($file != "." && $file != ".."){
            $f=file($path.$file);
            $data=intVal(str_replace("\n","",$f[0]));
            if($data<(time()-120)){
            @unlink($path.$file);
}
}
}
$cartella = @opendir($suff.'_online1');
while ($fi = readdir($cartella)) {
$array_file[] = $fi;
}
foreach ($array_file as $fi) {
if ( $fi == ".." || $fi == ".") {
continue;
}
$rep= str_replace(".txt","",$fi);
//color nick user online
$var=@file($suff."_impostaz/$rep.txt");
$dati=explode("||",$var[0]);
$coloronline=$dati[0];

$leveluser=0;
if(@file_exists($suff."_staff/$rep.txt"))
{
$leveluser=@file($suff."_staff/$rep.txt");
$leveluser=trim($leveluser[0]);}

$livelloutente="UTENTE";
if($leveluser==1) $livelloutente="[MODERATORE]";
if($leveluser==2) $livelloutente="[ADMIN]";
if($leveluser==3) $livelloutente="[WEBMASTER]";

//prelevo DATI DAL PROFILO user
if(@file_exists($suff."_profili/$rep.txt"))
{
$var2=@file($suff."_profili/$rep.txt");
$testo=explode("||",$var2[0]);
$nome=stripslashes($testo[0]);
$sesso=$testo[1];
$anni=stripslashes($testo[2]);
$regione=stripslashes($testo[3]);
$regione=ucwords($regione);
}else{
$nome="";
$sesso="";
$anni="";
$regione="";
}
if($sesso=="f") {$iconasesso="<img border=0 src=female.png>"; }
elseif($sesso=="m") {$iconasesso="<img border=0 src=male.png>";}else{$iconasesso="";}

$avataruser="default.gif>";
if(@file_exists($suff."_avatar/$rep.txt")){
$var=@file($suff."_avatar/$rep.txt");
$avataruser=trim($var[0]);
$rilpng=stristr($avataruser,".png");
if(!empty($rilpng)) {$avataruser="png/".$avataruser.">";}

if(empty($rilpng) AND !@file_exists("gallery/$rep/$avataruser.jpg")) $avataruser="default.gif>";
}

if(empty($rilpng) AND $avataruser!="default.gif>")
{
if($dispositivo=="PC") {$avataruser="gallery/$rep/$avataruser.jpg width=100>";}
else{$avataruser="gallery/$rep/$avataruser.jpg width=50>";}
}
?>
<A class=nodeco onmouseover="Tip('<font color=#000000>[b]<?php echo $livelloutente;?>[/b]</font>
<font color=#000000>Sesso: <?php echo $iconasesso?></font>
<font color=#000000>Anni: <?php echo $anni?></font>
<font color=#000000>Regione: <?php echo $regione?></font>
<img border=0 src=<?php echo $avataruser?>
[url="mp.php?page=send&user=<?php"]><font color=#000000>MP</font>[/url]- [url="listapvt.php?user=<?php"]><font color=#000000>PRIVATO</font>[/url]', OPACITY, 90, TEXTALIGN, 'center', TITLEALIGN, 'center', TITLE, '<?php echo $nome; ?>',  CENTERMOUSE, true, BORDERCOLOR,'#dd00aa', STICKY, 1, SHADOW, true, CLICKCLOSE, true,  BGCOLOR, '#ffffff', BORDERWIDTH, 2);" href="profilo.php?user=<?php echo $rep; ?>&page=chat"><font color=<?php echo $coloronline?>><?php echo $rep?></font></A><?php if($leveluser==1) echo "[img]traccia_bronzo.gif[/img]"; elseif($leveluser==2) echo "[img]medaglia_argento.gif[/img]"; elseif($leveluser==3) echo "[img]medaglia_oro.gif[/img]"?> 


<?php  }//end foreach
$num1=rand(1,12);
$algoritmo=(($num1*$number)+(4*$num1)+(2*$number));
$algoritmo.="9fjke76tr4";
$algoritmo=md5($algoritmo);
?>
</center></div></center>
<font><hr  size='1'color='#853CFF'></font>
<?php if(@file_exists($suff."_zittiti/$login.txt")){echo "<center><font color='red'>$login SEI STATO ZITTITO DALLO STAFF, NON PUOI SCRIVERE NELLE STANZE PUBBLICHE</font><font><hr color='#853CFF' size='1'></font></center>";}
if(
$totmp>=30){echo "<center><font color='red'>$login hai la casella PIENA(30 MP), svuotala per ricevere ulteriori MP</font><font><hr color='#853CFF' size='1'></font></center>";} ?>
<?
echo "<font color=\"#FFCC00\">Messaggio:</font>
"
;
?>
<form name="form1" method="POST" action="insertmess.php" acceptcharset="utf-8">
    <input name="msg" type="text" class="input" >
    <input type="Submit" class="button1" name="Submit" value="Invia/Aggiorna">
    <input type="reset" class="button2" value="c" >
    <input type="hidden" name="codice" value="<?php echo $algoritmo?>" >
    <input type="hidden" name="key" value="<?php echo $num1?>" >
</form>
volevo mettere prima il form e poi la lista online.
come posso farlo correttamente??

grazie a chi mi aiuterà...