Solved

Upload/Redisplay form

Posted on 1998-08-13
2
148 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copying table data to one another 15 36
Non-Resizable Pharagraph 2 17
TypeError jquery issues with site - CSS conflicts 3 24
html form layout 4 34
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

679 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