ho un problema:
Not Found
The requested URL /topprint/admin/checkanteprima.php was not found on this server.
Apache/2.0.54 (Win32) PHP/4.3.11 Server at localhost Port 80
il problema è che non esiste la pagina checkanteprima.php
i link egli action dei form non ridirigono a tale pagina
la cosa strana è che le stesse pagine su un altro sito funzionano su quest'altro no
ecco il codice
Codice PHP:
<?
session_start();
if(!isset($_SESSION['nick']))
{
header("Location:logout.php");
exit();
}
if($_GET)
{
$id=$_GET['id'];
include 'include/header.inc.php';
include 'include/left.inc.php';
echo" <td><center>";
echo "[b]Selezionare la quantità di prodotti che si desidera aggiungere!!![/b]";
echo " <form method=POST action=\"$_SERVER[PHP_SELF]\">
<select name=sel>";
for($i=1; $i<11; $i++)
{
echo "<option value=\"$i\" id=\"$i\">".$i."</option>";
}
echo "</select>
<input type=hidden name=id value=\"$id\">
<input type=submit name=submit value=submit>
</form>
";
echo "</td>";
include 'include/right.inc.php';
include 'include/footer.inc.php';
}
else if($_POST)
{
$id=$_POST['id'];
$i=$_POST['sel'];
/*echo $id."||".$i;*/
header("Location:edit_prod.php?id=$id&i=$i");
exit();
}
else
{
echo "ciao";
}
?>
e questa la pagina edit_prod.php
Codice PHP:
<?
if($_GET)
{
$id=$_GET['ids'];
$i=$_GET['sel'];
echo "
<center>
<form method=post action=\"$_SERVER[PHP_SELF]\">
<table>
<caption>Inserimento nuovi prodotti </caption>";
for($j=0;$j<$i;$j++)
{
echo "
<tr>
<td>Marca</td>
<td><input type=text name=marca></td>
</tr>
<tr>
<td>Modello</td>
<td><input type=text name=mod></td>
</tr>
<tr>
<td>Colore</td>
<td><input type=text name=col></td>
</tr>
<tr>
<td>Origine</td>
<td><input type=text name=orig></td>
</tr>
<tr>
<td>Disponibilità</td>
<td><input type=text name=disp></td>
</tr>
<tr>
<td>Prezzo Privato</td>
<td><input type=text name=prezzo></td>
</tr>
<tr>
<td>Prezzo Azienda</td>
<td><input type=text name=prezzoaz></td>
</tr>
<tr>
<td>Prezzo Rivenditori</td>
<td><input type=text name=prezzoriv></td>
</tr>
</table>
<hr>
";
}
echo "
<input type=hidden name=id value=$id>
<input type=submit name=submit value=Edita>
</form>
</center>
";
echo "</td>";
include 'include/right.inc.php';
include 'include/footer.inc.php';
}
else if($_POST)
{
$marca=addslashes($_POST['marca']);
$mod=addslashes($_POST['mod']);
$col=addslashes($_POST['col']);
$orig=addslashes($_POST['orig']);
$disp=addslashes($_POST['disp']);
$prezzo=addslashes($_POST['prezzo']);
$prezzoaz=addslashes($_POST['prezzoaz']);
$prezzoriv=addslashes($_POST['prezzoriv']);
$id=addslashes($_POST['id']);
include 'include/conf.inc.php';
$sql=mysql_query("update tbl_prodotti set marca='$marca',modello='$mod',tipo='$col',origine='$orig',qt='$disp',prezzo='$prezzo',prezzoaz='$prezzoaz',prezzoriv='$prezzoriv' where id_categorie='$id'");
}
?>
nonso piu che pesci pigliare