Need to add something to form to make file uploads possible.. but what?

J

Joey

Hi, I apologize in advance for what will sound like ridiculous questions,
but I have never even attempted to dabble with 'cgi' or perl or whatever
until today...

Basically I am trying to finish the final page of my photo restoration
website, where I want to be able to let users fill out a contact form and
upload some photos before they 'submit' the information.

I found a really useful tutorial for cgi beginners
(http://www.cyberface-support.co.za/escgiemail.html) which i followed and to
my amazement it worked - I was able to set up the script and when I tested
the online form it did indeed get emailed to me etc.

The only problem is - the tutorial did not mention uploading files. I found
some html code somewhere on the web to create the buttons and on the web
page it looks perfect, works perfect - I am able to browse for the files,
but of course when I hit 'submit' the 'uploaded' files don't go anywhere -
since there is no mention of them in the email 'template.txt' of where
exactly they should go. Ideally I want them attached to the email, but I
would settle just for them being uploaded to a directory on my server.

I have pasted my embarassing 'script' below - can someone tell me if there
is something I could change to make this possible?

PS - I also want the Max File size to be bigger - what figure do I need to
put in to limit each upload to 5 MB?

Thanks in advance,

Joanna

PS (The web page mentioned here in the code is currently not active - but
will be)


</font></p>
<form action="/cgi-sys/cgiemail/template.txt" method="post"
name="order">
<font face="Verdana" size="2"><input name="success"
value="http://www.fotofairy.co.uk/confirm.htm" type="hidden">

</font>
<p><font face="Verdana" size="2">NAME:
</font></p>
<p><font face="Verdana" size="2"><input name="name"
type="text"></font></p>
<font face="Verdana" size="2">

</font>
<p><font face="Verdana" size="2">EMAIL ADDRESS:
</font></p>
<p><font face="Verdana" size="2"><input name="email"
type="text"></font></p>
<font face="Verdana" size="2">

</font>
<p><font face="Verdana" size="2">DESCRIPTION OF WHAT YOU WOULD LIKE
DONE: </font></p>
<font face="Verdana" size="2"> </font>
<p><font face="Verdana" size="2"><textarea name="comments" rows="10"
cols="40"></textarea></font></p>


<p><font face="Verdana" size="2">CHOOSE THE PICTURES YOU WANT TO
SEND US: </font></p>
<p>
<font face="Verdana" size="2"><input name="MAX_FILE_SIZE" value="51200"
type="hidden">
<input name="fupload" type="file"><br>


<input name="MAX_FILE_SIZE" value="51200" type="hidden">
<input name="fupload" type="file"><br>


<input name="MAX_FILE_SIZE" value="51200" type="hidden">
<input name="fupload" type="file"><br>


<input name="MAX_FILE_SIZE" value="51200" type="hidden">
<input name="fupload" type="file"><br>


</font></p>

<font face="Verdana" size="2"><input name="MAX_FILE_SIZE"
value="51200" type="hidden">
<input name="fupload" type="file"><br>
<br>


<input type="checkbox"> &lt; TICK HERE IF YOU REQUIRE PRINTED
PHOTOS (Extra charges apply - see <a
href="http://www.fotofairy.co.uk/prices.html"><span style="text-decoration:
underline;">Prices</span></a> for more information)<br>

<br>

<input value="Submit Order Query" type="submit">
 
U

Uri Guttman

J> I found a really useful tutorial for cgi beginners
J> (http://www.cyberface-support.co.za/escgiemail.html) which i
J> followed and to my amazement it worked - I was able to set up the
J> script and when I tested the online form it did indeed get emailed
J> to me etc.

that isn't a tutorial on cgi. it is a simple howto on using that
particular cgi script that sends email for you.

J> The only problem is - the tutorial did not mention uploading files.
J> I found some html code somewhere on the web to create the buttons
J> and on the web page it looks perfect, works perfect - I am able to
J> browse for the files, but of course when I hit 'submit' the
J> 'uploaded' files don't go anywhere - since there is no mention of
J> them in the email 'template.txt' of where exactly they should go.
J> Ideally I want them attached to the email, but I would settle just
J> for them being uploaded to a directory on my server.

the script itself needs to handle the upload. you can't write html to
make the script do something it isn't programmed to do. it is designed
to send email and not do upload (at least according to what i read. the
cgi source appears to be private).

J> I have pasted my embarassing 'script' below - can someone tell me if there
J> is something I could change to make this possible?

that isn't a 'script. it is html which is just fancy looking text with
some form stuff. it won't do anything unless there is a web server with
cgi (or other technology) that will handle the html forms.

you need to find a file upload script (or write one) and a hoster that
will let you run it.

uri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top