Ragazzi salve devo modificare un file in base ad un pannello che ho creato...
Praticamente è un sistema per aggiornare delle news solo che ora devo mod. per un sito per il fantacalcio dove io inserisco le PARTITE che si devono disptare da un pannello... ecco gli script:

pannello.php


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento senza titolo</title>
<style type="text/css">
<!--
.Stile1 {
font-family: verdana;
font-size: 12px;
}
.Stile2 {font-family: verdana; font-size: 12px; color: #0000FF; }
-->
</style>
</head>

<body>
<table width="200" bordercolor="#000000" style="border:1px solid">
<tr>
<td class="Stile2">Img</td>
<td class="Stile1"><div align="center" class="Stile2">Squadra</div></td>
<td class="Stile2">Pt.</td>
<td class="Stile2">Img</td>
<td class="Stile1"><div align="center" class="Stile2">Squadra</div></td>
<td class="Stile2">Pt.</td>
</tr>
<tr>
<td><input name="immagine" type="file" value="" size="10" /></td>
<td><form id="form1" name="form1" method="post" action="">
<label>
<input name="squadra1" type="text" id="squadra1" size="15" />
</label>
</form> </td>
<td><form id="form2" name="form2" method="post" action="">
<label>
<input name="punti1" type="text" id="punti1" size="5" maxlength="4" />
</label>
</form> </td>
<td><input name="immagine2" type="file" id="immagine2" value="" size="10" /></td>
<td><input name="squadra2" type="text" id="squadra2" size="15" /></td>
<td><input name="punti2" type="text" id="punti2" size="5" maxlength="4" /></td>
</tr>
<tr>
<td><input name="immagine3" type="file" id="immagine3" value="" size="10" /></td>
<td><input name="squadra3" type="text" id="squadra3" size="15" /></td>
<td><input name="punti3" type="text" id="punti3" size="5" maxlength="4" /></td>
<td><input name="immagine4" type="file" id="immagine4" value="" size="10" /></td>
<td><input name="squadra4" type="text" id="squadra4" size="15" /></td>
<td><input name="punti4" type="text" id="punti4" size="5" maxlength="4" /></td>
</tr>
<tr>
<td><input name="immagine5" type="file" id="immagine5" value="" size="10" /></td>
<td><input name="squadra5" type="text" id="squadra5" size="15" /></td>
<td><input name="punti6" type="text" id="punti6" size="5" maxlength="4" /></td>
<td><input name="immagine6" type="file" id="immagine6" value="" size="10" /></td>
<td><input name="squadra6" type="text" id="squadra6" size="15" /></td>
<td><input name="punti6" type="text" id="punti6" size="5" maxlength="4" /></td>
</tr>
<tr>
<td><input name="immagine7" type="file" id="immagine7" value="" size="10" /></td>
<td><input name="squadra7" type="text" id="squadra7" size="15" /></td>
<td><input name="punti7" type="text" id="punti7" size="5" maxlength="4" /></td>
<td><input name="immagine8" type="file" value="" size="10" /></td>
<td><input name="squadra8" type="text" id="squadra8" size="15" /></td>
<td><input name="punti8" type="text" id="punti8" size="5" maxlength="4" /></td>
</tr>
<tr>
<td colspan="6"><form id="form3" name="form3" method="post" action="salva.php">
<div align="right">
<input name="Submit" type="submit" class="Stile1" value="Inserisci" />
</div>
</form>
</td>
</tr>
</table>
</body>
</html>



salva.php

<?php

include("dati.php");

if (($_SESSION['user2']!=$_SESSION['user'])||($_SESSION['pass2']!=$_SESSION['pass']))
{
die ("Accesso non autorizzato!");
}

$titolo=$_POST['titolo'];
$titolo=str_replace("<","&lt;",$titolo);
$titolo=str_replace(">","&gt;",$titolo);

if (is_uploaded_file($_FILES['immagine']['tmp_name']))
{
if (file_exists('immagini/'.$_FILES['immagine']['name']))
{
die ("Nome del file già esistente! Cambiare nome");
}
move_uploaded_file($_FILES['immagine']['tmp_name'],'immagini/'.$_FILES['immagine']['name'])
or die ("Errore nel salvare l'immagine!");
}

$nomeimage = $_FILES['immagine']['name'];
$imagethunb= $nomeimage;
$immagineth= $imagethunb;

$new_width=100;
$new_height=100;
$compression=75;
$source_path="immagini/";
$destination_path="immagini/";

$destimg=imagecreatetruecolor($new_width,$new_heig ht) or die("Problemi nelle creazioni dell'immagine");
$srcimg=ImageCreateFromJPEG($source_path.$nomeimag e) or die("Problemi nell'aprire l'immagine");
imagecopyresampled($destimg,$srcimg,0,0,0,0,$new_w idth,$new_height,ImageSX($srcimg),ImageSY($srcimg) ) or die("Problemi nel ridimensionamento");
ImageJPEG($destimg,$destination_path.$imagethunb,$ compression) or die("Problemi nel salvataggio");

$testo=$_POST['testo'];
$testo=nl2br($testo);

mysql_query("insert into news (titolo,immagine,testo) values ('$titolo','$nomeimage','$testo')",$db)
or die ("Errore query!");

echo "Informazioni salvate con successo! <a href=\"pannello.php\">Torna al pannello</a>";

mysql_close($db);

?>


A presto