Dzięki za skrócik, ale mi tu w nadpisywaniu prawie wszystko chodziło, tzn zle ale nadpisywal, a zmienilem cos czego juz nie pamietam (bo robilem na chybil-trafil) i teraz mi tylko error page wywala
<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
$adata = $_GET['adata'];
$aimg = $_GET['aimg'];
$akod = $_GET['akod'];
$anazwa = $_GET['anazwa'];
$arozmiar = $_GET['arozmiar'];
$afirma = $_GET['afirma'];
$amaterial = $_GET['amaterial'];
$aopis = $_GET['aopis'];
$acena = $_GET['acena'];
$awinner = $_GET['awinner'];
$anowa = ($acena + 0.5);
$przebij = $anowa;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && strlen($_POST['nowa'])) {
$found = false;
$activeaccounts = array(); $count = 0;
$success_page = './aukcje.php';
$error_page = './aerror.php';
$database = './db/aukcje.csv';
{
header('Location: '.$error_page); }
else
{
$items = file($database); foreach($items as $line)
{
list
($logtime, $xtime, $ximage, $xcode, $xname, $xsize, $xfirma, $xsquad, $xopis, $xcena, $xuser, $active) = explode('|', trim($line));
$logtimes[$count] = $logtime;
$xtimes[$count] = $xtime;
$ximages[$count] = $ximage;
$xcodes[$count] = $xcode;
$xnames[$count] = $xname;
$xsizes[$count] = $xsize;
$xfirmas[$count] = $xfirma;
$xsquads[$count] = $xsquad;
$xopiss[$count] = $xopis;
$xcenas[$count] = $xcena;
$xusers[$count] = $xuser;
$activeaccounts[$count] = $active;
if ($akod == $xcode)
{
$found = true;
}
$count++;
}
}
if ($found == true)
{
$file = fopen($database, 'w'); for ($i=0; $i < $count; $i++)
{
if ($xcodes[$i] == $akod)
{
}
else
{
}
fwrite($file, $activeaccounts[$i]); }
header('Location: '.$success_page); }
else
{
header('Location: '.$error_page); }
}
?>
podejrzewam acz jestem niemal pewien, ze babol jest w linijce 63
if ($akod == $xcode)