Michael Fesser wrote:
.oO(Armin)
Quarco wrote:
register globals = on;
tried that one?
Thank you very much Quarco !!
i tryed around 20 hours (in the last two weeks)
it works!
Now turn it off again and learn how to do it properly with using the
predefined arrays $_GET, $_POST etc.
Using Register Globals
http://www.php.net/manual/en/security.globals.php
Predefined variables
http://www.php.net/manual/en/languag...predefined.php
Micha
Hi Micha!
In my case the php-program runs only in intranet.
I guessed turn it on is a bit unsecure.
So, i will learn how to do it without.
Thanks for your help too!
Armin
Here are parts of the script:
the form:
......
<tr>
<td align=center colspan=2>
<form action="index.php" method="post">
<br>Umsatz-tag, Brutto-Umsatz
<br>
<input name="tag" size=20 maxlength=30>
<input name="umsatz" size=10>
<br>
<input type=submit value="speichern" name="sp_umsatz">
</form>
</td>
<td align=center colspan=2>
<form action="index.php" method="post">
<br>Wareneinkauf, b=brutto n=netto, Betrag
<br>
<input name="ware" size=20 maxlength=30>
<input name="steuer" size=3 maxlength=1>
<input name="summe" size=10>
<br>
<input type=submit value="speichern" name="sp_ware">
</form>
</td>
save data:
.......
################ falls Eingaben >> speichern
if (isset($sp_ware))
{
if (($summe != "") && ($steuer != "") && ($ware != ""))
{
if ($steuer=="b") {
$netto=($summe/6*5);
}
else {$netto=$summe;
}
#=============== formatieren der Daten:
$netto =round ($netto, 2);
################# Datei einkauf.txt oeffnen und zeile anhaengen
$e = fopen("data/einkauf.txt","a");
fputs($e, $ware."\t");
fputs($e, $netto."\n");
fclose ($e);
}
}
if (isset($sp_umsatz))
{
if (($umsatz != "") && ($tag != ""))
{
$umsatz_n = ($umsatz/6*5);
$umsatz_n_r = round ($umsatz_n,2);
############## datei umsatz.txt oeffnen und zeile anhaengen
$u = fopen("data/umsatz.txt","a");
fputs($u, $tag."\t");
fputs($u, $umsatz_n_r."\n");
fclose ($u);
}
}
........