473,396 Members | 1,785 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,396 software developers and data experts.

upload

I want to give the user a "Browse" button to locate the file on his system
that he wants to upload to the server. Where is a good example of how to do
this?

Shelly
Jul 17 '05 #1
10 1685
Shelly wrote:
I want to give the user a "Browse" button to locate the file on his system
that he wants to upload to the server. Where is a good example of how to do
this?

Shelly


You need to use javascript. PHP runs on the server and doesn't have
access to the user's file system (thank goodness!).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #2
Shelly ÐÉÛÅÔ:
I want to give the user a "Browse" button to locate the file on his system
that he wants to upload to the server. Where is a good example of how to do
this?

Shelly

HTML tag:
<input type="file" name="userfile">
that's all you need.
Try
Jul 17 '05 #3

"Ivan Omelchenko 608308824" <ne**@omelchenko.com> wrote in message
news:42**************@omelchenko.com...
Shelly ÐÉÛÅÔ:
I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example of
how to do this?

Shelly

HTML tag:
<input type="file" name="userfile">
that's all you need.
Try


No, I want to have a "Browse" button on the web page that the user clicks
and uses to locate the file he wants. He would then click "OK" and I would
have the full file path for "userfile" in order to use the upload function
in php.

Shelly
Jul 17 '05 #4

"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:q6********************@comcast.com...
Shelly wrote:
I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example of
how to do this?

Shelly


You need to use javascript. PHP runs on the server and doesn't have
access to the user's file system (thank goodness!).


Do you have an example anywhere and can I mix and match with php files?

Shelly

Jul 17 '05 #5
Shelly wrote:
"Ivan Omelchenko 608308824" <ne**@omelchenko.com> wrote in message
news:42**************@omelchenko.com...
Shelly ÐÉÛÅÔ:
I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example of
how to do this?

Shelly


HTML tag:
<input type="file" name="userfile">
that's all you need.
Try

No, I want to have a "Browse" button on the web page that the user clicks
and uses to locate the file he wants. He would then click "OK" and I would
have the full file path for "userfile" in order to use the upload function
in php.

Shelly


Google is your friend:

http://www.phpfreaks.com/tutorials/36/0.php

or

http://www.google.com.au/search?q=php+upload+tutorial
Jul 17 '05 #6
Don't listen to that. It's not true.
partially HTML and partly php will do fine.
read the tutorial, plz

"Shelly" <sh************@asap-consult.com> wrote in message
news:C4********************@comcast.com...

"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:q6********************@comcast.com...
Shelly wrote:
I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example of how to do this?

Shelly


You need to use javascript. PHP runs on the server and doesn't have
access to the user's file system (thank goodness!).


Do you have an example anywhere and can I mix and match with php files?

Shelly

Jul 17 '05 #7
Michel wrote:
Don't listen to that. It's not true.
partially HTML and partly php will do fine.
read the tutorial, plz

"Shelly" <sh************@asap-consult.com> wrote in message
news:C4********************@comcast.com...
"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:q6********************@comcast.com...
Shelly wrote:

I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example
of
how to do this?

Shelly

You need to use javascript. PHP runs on the server and doesn't have
access to the user's file system (thank goodness!).


Do you have an example anywhere and can I mix and match with php files?

Shelly



Please tell me - how can you list files on the user's computer via PHP?
That would be a HUGE security risk!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #8
Shelly wrote:
"Ivan Omelchenko 608308824" <ne**@omelchenko.com> wrote in message
news:42**************@omelchenko.com...
Shelly ÐÉÛÅÔ:
I want to give the user a "Browse" button to locate the file on his
system that he wants to upload to the server. Where is a good example of
how to do this?

Shelly


HTML tag:
<input type="file" name="userfile">
that's all you need.
Try

No, I want to have a "Browse" button on the web page that the user clicks
and uses to locate the file he wants. He would then click "OK" and I would
have the full file path for "userfile" in order to use the upload function
in php.

Shelly

If you want Browse....

<input type="file" name="Browse">

But the PHPfreaks tutorial will show you how to handle the file upload.
Jul 17 '05 #9

"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:rL********************@comcast.com...
Please tell me - how can you list files on the user's computer via PHP?
That would be a HUGE security risk!


As I have just learned, it is HTML and not PHP. An HTML input type of
"files" brings up the browse button. This is run on the user's machine, not
the server, so only the user sees his own files. The submit button simply
activates sending only the ONE chosen file (fully specified), and since this
is the one he wants to send anyway, who cares?

Shelly
Jul 17 '05 #10
Shelly wrote:
"Jerry Stuckle" <js*******@attglobal.net> wrote in message
news:rL********************@comcast.com...
Please tell me - how can you list files on the user's computer via PHP?
That would be a HUGE security risk!

As I have just learned, it is HTML and not PHP. An HTML input type of
"files" brings up the browse button. This is run on the user's machine, not
the server, so only the user sees his own files. The submit button simply
activates sending only the ONE chosen file (fully specified), and since this
is the one he wants to send anyway, who cares?

Shelly


That's true. However, I thought you wanted a separate "browse" button
to be able to select files - not the one with the "files" input.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #11

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

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
2
by: Sean Dotson | last post by:
I have a form that passes variables to an asp file and then uploads a file. For some reason the request.form is not getting the info from the form. It's returning blanks. Any insight would be...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancý kaynakli bir scriptti duzenledim yanlýz birseyin içinden bir turlu cýkamadým iþin aslý ilk defa persistin upload componentini kullanacam yanlýz suanki haliyle...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
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"...
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
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...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.