473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

File upload - code

Hi, I say some of you wanted that so here it is... i just copy pasted it as
i use it on my page without changes so you transforme it any way you like!!

upload.php
-----------------------
<html>
<head>
<link rel=stylesheet type="text/css" href="../stil.css">
<title>MAjNe StraNiCa - UPLOAD</title>M
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<body bgcolor="#333333" text="#CCCCCC">
<p>

Forma za slanje datoteka na server!!<br>
Ukoliko ne znate lozinku to necete moci uciniti :))<br>
<hr width="50%" align="left">
<form enctype="multipart/form-data" action="up.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
Datoteka: <br><input name="userfile" type="file" size="25">
<p>
Lozinka: <br><INPUT TYPE="password" NAME="pwd" size="25">
<p>
<input type="submit" value="UpLoad">
</form>
<hr width="50%" align="left">
<p>
</body>
</html>
-------------------------

up.php
-------------------------
<html>
<head>
<title>prebacujem podatke</title>
<link rel=stylesheet type="text/css" href="../stil.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body bgcolor="#333333" text="#CCCCCC">
</head>

<body>
<p align="center">
<?php
if($pwd=="trustno1") {
copy ($userfile,
"/home/users/d/dedamraz/public_html/upload/stiglo/$userfile_name");

echo "<center>$userfile <br>";
echo "$userfile_name <br>";
echo "$userfile_size <br>";
echo "$userfile_type <br>";
echo "$MAX_FILE_SIZE <br>";
echo "DATOTEKA POSLANA NA SERVER<p>";
} else
echo "KRIVA LOZINKA!!!";
?>
</body>
</html>

--
Bolje ispasti glup nego iz aviona!
Jul 16 '05 #1
0 3281

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
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...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
4
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>...
1
by: DavidA | last post by:
I have a very simple form and perl script that is to upload a jpg file. I am not familiar with the perl language but copied the code from a text book. It works fine with all browsers except IE....
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
3
acoder
by: acoder | last post by:
How to Upload a File in Coldfusion Use the cffile tag for uploading files to the server. Note that allowing people to upload files is fraught with danger and only trusted users should be...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
6
Jacotheron
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...
5
by: kailashchandra | last post by:
I am trying to upload a file in php,but it gives me error msg please Help me? My Code is like below:- i have one php file named upload.php and i have another html file named upload.html and...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.