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

View files uploaded through form

Hi,
I have made a registration form for job site in which the user uploads a .doc or .txt file through form along with the other details stored in the database. The uploaded files is sored in the upload folder that i created in working directory and not in the database. Now when someone enters the search page and enters the search criteria the name of the users with that criteria are listed. When i ckick on the name of any user then his details are displayed which he filled during registration. Now i want that the details page that is displayed should also give the user a link to view the file uploaded by that particular user whose details are diaplayed. How can i assign a link to view the uploaded file that is not in the database but in some folder. Can this be done. Plz let me know.
Thanks.
Mar 16 '08 #1
2 1471
The name of the file is stored in the database.
Mar 16 '08 #2
ronverdonk
4,258 Expert 4TB
Depends whether you want to download it first to the user and then view it or want to show it to the user directly. You know how to download. For the direct view you can read the file yourself, translate any newlines to <br> and just echo it to the screen.
[php]$file = 'your_textfile_on_server';
$fh = fopen($file, 'r+');
$text = fread($fh, filesize($file));
$text = nl2br(strip_tags($text));
fclose($fh);
echo $text;[/php]Ronald
Mar 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web...
2
by: underground | last post by:
I need a little help figuring this one out. I have a script that should post mutiple binary files into a single row but instead of copying the indiviuals files it rewrites the first file to all the...
10
by: underground | last post by:
I need a little help figuring this one out. I have a script that I've modified to post mutiple binary files into a single row but instead of copying the indiviuals files it rewrites the first file to...
3
chunk1978
by: chunk1978 | last post by:
hi there... i have a form where a user may optionally upload a maximum of 2 files along with other textual data (there are 2 file fields built in the form). i'm having trouble writing a php script...
0
by: dann2 | last post by:
hello, i try to upload in an access db two pictures at the same time. i use the adjusted sample code from persits. it looks like this: ... '<% ' Create an instance of AspUpload object 'Set...
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...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
4
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
0
by: LoriFranklin | last post by:
I'm a bit of a newbie here. I've learned a lot from reading the posts you all have here. I need some help uploading files using an asp form. I am using some code that I found from Jacob at...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.