Bardzo dziwne! Zmienna roznicax jest umieszczina w tablicy superglobalnej $_POST , a program jej nie printuje, dlaczego?

spawn.php \/
<?php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Creation-date" content="2007-04-10T18:55:03Z">
<meta name="Authoring-tool" content="Pajaczek NxG PRO v5.6.1">
</head>
<body>
<form enctype="multipart/form-data" action="code.php" method="POST">
<table border="1">
<tr>
<td>
<!-- MAX_FILE_SIZE must precede the
file input field
-->
<!-- Name of input element determines name in
$_FILES array --> Plik: <input name="plik" type="file" />
</td>
</tr>
<tr>
<td>Potworek był na pozycji:</td>
<td>Potworek jest na pozycji:</td>
</tr>
<tr>
<td>X
<input type="text" name="x1" value="" /></td>
<td>X
<input type="text" name="x2" value="" /></td>
</tr>
<tr>
<td>Y
<input type="text" name="y1" value="" /></td>
<td>Y
<input type="text" name="y2" value="" /></td>
</tr>
<tr>
<td>Z
<input type="text" name="z1" value="" /></td>
<td>Z
<input type="text" name="z2" value="" /></td>
</tr>
</table>
<table width="100$" height="100%">
<tr>
<td align="center" valign="middle" width="300px">
<input type="submit" name="submit" value="Wykonaj" /></td>
</tr>
</table>
</form>
</body>
</html>
?>
code.php \/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Creation-date" content="2007-04-12T13:02:48Z">
<meta name="Authoring-tool" content="Pajaczek NxG PRO v5.6.1">
<title></title>
</head>
<body>
<?php
$_POST['roznicax']=$_POST['x2']-$_POST['x1'];
$_POST['roznicay']=$_POST['y2']-$_POST['y1'];
$_POST['roznicaz']=$_POST['z2']-$_POST['z1'];
print('Roznica X:'. $_POST['roznicax']); print('Roznica Y:'. $_POST['roznicay']); print('Roznica Z:'. $_POST['roznicaz']);
$uploaddir = '/Program Files/WebServ/httpd/spawn/XML/';
$uploadfile = $uploaddir . basename($_FILES['plik']['name']);
echo "Pierwszy stpień obliczeń - DONE!"; } else {
echo "Possible file upload attack!"; }
$fd=fopen($uploadfile,"r+");
function addToX($matches) //credits to nospor
{
print $_POST['roznicax']; // w TYM miejscu nie printuje!!! return 'x="'.($matches[1]+$_POST['roznicax']).'"';
}
$text = "$fstring";
$search = '/x="(d+)"/';
?>
</body>
</html>
POMOCY!
Ten post edytował Tilosag 12.04.2007, 15:02:29