Hello,
I'm having trouble uploading files via post method. I'm using this code for the form:
<form enctype="multipart/form-data" method="POST" action="run_dodaj_alb.php">
<p>Naziv albuma:<br><input type="text" name="naziv" size="35" value="<?php if (isset($row->naziv)) echo $row->naziv; ?>"></p>
<p>Godina izdanja: <input type="text" name="godina" size="4" value="<?php if (isset($row->godina)) echo $row->godina; ?>"></p>
<p>Slika:<br><input type="file" name="fajla"><br>
<?php if (isset($_POST['edit'])) { ?><input type="submit" name="Submit" value="Samo makni trenutacnu sliku"><?php } ?>
<input type="hidden" name="MAX_FILE_SIZE" value="500000"></p>
<?php
if (isset($_POST['edit'])) { ?>
<input type="hidden" name="edit" value="<?php echo $_POST['edit']; ?>">
<p><input type="submit" value="Uredi album"></p>
<?php } else { ?>
<p><input type="submit" value="Dodaj album"></p>
<?php }
?>
</form>
And this code for handling upload:
if ($_FILES['fajla']['name']!="") {
$slika="slike/" . $_FILES['fajla']['name'];
echo $_FILES['fajla']['tmp_name'] . "<br>";
move_uploaded_file($_FILES['fajla']['tmp_name'], "/home/users/n/nick/public_html/umzpa/rokeri/" . $slika);
//print_r($_FILES);
$slika="'" . $slika . "'";
} else $slika="NULL";
Now, the file doesn't get uploaded. Not to the $slika place, anyway. I searched
for the $_FILES['fajla']['tmp_name'] file, but it doesn't seem to be there. Where
do I start searching for the problem?
--
"Stara boljka se leci starim lekom...
Dabome vinom, ta nebi valjda mlekom?" 2 1806
On Mon, 21 Jun 2004 09:44:21 +0000, Nikola Skoric wrote: Hello,
I'm having trouble uploading files via post method. I'm using this code for the form:
<snip!> Now, the file doesn't get uploaded. Not to the $slika place, anyway. I searched for the $_FILES['fajla']['tmp_name'] file, but it doesn't seem to be there. Where do I start searching for the problem? http://us4.php.net/features.file-upload
--
Jeffrey D. Silverman | jeffrey AT jhu DOT edu
Website | http://www.wse.jhu.edu/newtnotes/
Dana Mon, 21 Jun 2004 12:42:46 -0400,
Jeffrey Silverman <je*****@jhu.edu> kaze: On Mon, 21 Jun 2004 09:44:21 +0000, Nikola Skoric wrote:
Hello,
I'm having trouble uploading files via post method. I'm using this code for the form: <snip!> Now, the file doesn't get uploaded. Not to the $slika place, anyway. I searched for the $_FILES['fajla']['tmp_name'] file, but it doesn't seem to be there. Where do I start searching for the problem?
http://us4.php.net/features.file-upload
Yes, yes, I copy/pasted the code from there and then edited it a little bit. But
it doesn't work...
--
"Stara boljka se leci starim lekom...
Dabome vinom, ta nebi valjda mlekom?" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Amy Kimber |
last post by:
Hello,
I have a file upload page, and I've had it working fine, it was
beautiful :-) Anyway, the powers that be moved hosts... and it doesn't
work now.
The file name is correct, the directory...
|
by: PeterB |
last post by:
Hi!
I'm using Pure ASP File Upload (http://www.asp101.com/articles/jacob/scriptupload.asp) to upload a file from a client to a server. I am testing both on a local IIS and a remote server. The...
|
by: Sky Sigal |
last post by:
I have created an IHttpHandler that waits for uploads as attachments for a
webmail interface, and saves it to a directory that is defined in
config.xml.
My question is the following:
assuming...
|
by: Mark Miller |
last post by:
I've been trying to execute a javascript function just before submit on a
form that contains an <input type="file"> input field and it isn't working.
The reason I want to do this is the end users...
|
by: Jen |
last post by:
I'm using Microsoft's own VB.NET FTP Example:
http://support.microsoft.com/default.aspx?scid=kb;en-us;832679
I can get the program to create directories, change directories, etc.,
but I can't...
| |
by: mpar612 |
last post by:
Hello,
I am a newbie to PHP, MySQL. I am trying to create a basic file upload
form. I want to get that working and then I want to integrate that
into a form that will rename the file and save...
|
by: markus.rietzler |
last post by:
i want to do (multiple) file upload(s) and display a progress bar.
with firefox and safari it is no problem at all. only IE makes some
problems.
my script is based on ajax-uploader, which can be...
|
by: cassbiz |
last post by:
Could use some help here.
This script is carrying over an image just fine but the text isn't coming over. can you see why it is not working????
from the form I want to carry over two lines of...
|
by: Jacotheron |
last post by:
I need a PHP script that can upload music files (mp3). The script is for a home project I have started a while ago. I have a MySQL database of all the music that I have. Other computers on the...
|
by: wassimdaccache |
last post by:
Dear sirs,
It is shame to me to say that I have been 1 week working in this problem and it is not working.
I am getting this error while I am uploading a file using my website.
Warning:...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |