Zdravim, mam formular (index.php), ktory posle subor a 2 textove (ciselne) hodnoty:
Kód:
<form method="post" action="upload.php" enctype="multipart/form-data">
Obrázok: <input name="image" type="file" size="40" />
Suradnica X: <input name="X" type="text" size="10" />
Suradnica Y: <input name="Y" type="text" size="10" />
<input type="submit" name="Action" value="Upload">
</form>
a upload.php
Kód:
<?php
echo $Action.",".$image.",".$X.",".$Y."\n<br>";
$info = pathinfo($_FILES['image']['name']);
$ext = $info['extension'];
$newname = $X."_".$Y.$ext;
$target = 'images/'.$newname;
move_uploaded_file( $_FILES['image']['tmp_name'], $target);
...
problem je ze premenne Action,image, X,Y sa do upload.php vobec neposlu (
Notice: Undefined variable: image in .../upload.php on line 2 atd.)
Prava mam na 777.
Nastavenie PHP