Solved

Upload/Redisplay form

Posted on 1998-08-13
2
145 Views
Last Modified: 2010-04-09
I have a question. I am trying to build a website in which I want to redisplay a gif picture someone upload.
For example: The first page it is the information page. A user fill out the information and there will be a upload
form on there as well. After word the user sumbit the information, the second page redisplay the upload pic the user submit and the information the filled out.
How do i go about writting a code doing it? Does not have to be huge but something to give me an idea
on how to do it. Thanks. I need the upload part as well as the redisplay part. THanks.
0
Comment
Question by:smilepak
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 260 total points
ID: 1845308
in perl, using cgi-lib:

=============================
require "./cgi-lib.pl";

# When writing files, several options can be set... here we just set one
# Limit upload size to avoid using too much memory

$cgi_lib'maxdata = 50000;         # zijn dit bytes, bits, oorspronkelijk 50000 ?


$ret = &ReadParse;

open(OUTFILE, ">upload/test.gif");
binmode (OUTFILE);
syswrite (OUTFILE, $in{'upfile'}, length $in{'upfile'});
close(OUTFILE);


# Now produce the result: an HTML page...


print &PrintHeader;
print &HtmlTop("File Upload Results");

print "$in{'upfile'}";

print "\n<P>File was uploaded<P>";


print &HtmlBot;

===========================

In ASP it would look different of course.
0
 
LVL 2

Author Comment

by:smilepak
ID: 1845309
THanks,So is it possible fro you to explain to code a little more.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now