Solved

Upload/Redisplay form

Posted on 1998-08-13
2
144 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
Comment Utility
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
Comment Utility
THanks,So is it possible fro you to explain to code a little more.

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

772 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

11 Experts available now in Live!

Get 1:1 Help Now