Log in

View Full Version : Upload through HTML



kosmasKosmakos
10-29-2008, 07:24 AM
Hi everyone. here i am once again (lol like the song).

Looking for some help if you please?

I have made a html form that works together with dynaform but i have a problem and i can not upload files. It only shows the name of the file and the type ex. jpeg

can someone help?

I give you a very simple form of what i use: (mine has a lot of things in it so i made it simple)


<CENTER>
<FORM action="http://www.MYWEBSITE.DOMAIN/dynaform.php" method="POST" sty0le="font-size : 10px;font-family : Verdana;color : white;" charset=windows-1253><input type='hidden' name='rec_mailto' value='MAIL@'><input type='hidden' name='rec_subject' value='SUBJECT'><input type='hidden' name='rec_thanks' value='THANKS URL'>

<INPUT type="text" size="20" name="Your name" value="Your name" onfocus="javascript:if(this.value=='Your name') {this.value='';}" onblur="javascript:if(this.value=='') {this.value='Your name'}" style="border-top-width : 1px;border-right-width : 1px;border-bottom-width : 1px;border-left-width : 1px;border-color : blue blue blue blue;">

<br><br>

<label for="fileatt">File1:</label>
<input id="fileatt" type="file" name="fileatt" tabindex="1" />

<br>

Comments:
<TEXTAREA name="Comments" rows="5" cols="50" style="border-top-width : 1px;border-right-width : 1px;border-bottom-width : 1px;border-left-width : 1px;border-color : blue blue blue blue;"></TEXTAREA>

<br><br>

<INPUT type="submit" value="Send it" style="font-size : 10px;font-family : Verdana;font-weight : bold;color : navy;background-color : white;"></FORM>

</CENTER>

Is there some other html or something like dynaform that i can use to upload my files please?

Thank you in advance.

ps: sorry my English are bad :(

rangana
10-29-2008, 09:25 AM
This can't be done with HTML alone. You need server-side scripts:

You might find this link useful:
http://www.tizag.com/phpT/fileupload.php
http://www.w3schools.com/PHP/php_file_upload.asp

kosmasKosmakos
10-29-2008, 10:34 AM
Oh, i see! great! thanks a lot!!! :)

Edit: well i think that i may have explain it wrong. that is my mistake. what i need to have is a contact form in wich i will have up to 2-3 files uploaded, and what i need is that these files will be sent with the form to a mail and appear like attachments.

Is there something that can do that?

Medyman
10-29-2008, 01:15 PM
Rangana's suggestion is still right. You would need some sort of server-side script to do this. If your server supports PHP, here is a tutorial on how to script such functionality.

kosmasKosmakos
10-29-2008, 04:39 PM
Rangana's suggestion is still right. You would need some sort of server-side script to do this. If your server supports PHP, here is a tutorial on how to script such functionality.

here where? here "here" or here up there?

yes my server supports php :)

thanks

boogyman
10-29-2008, 05:30 PM
This can't be done with HTML alone. You need server-side scripts:

You might find this link useful:
http://www.tizag.com/phpT/fileupload.php
http://www.w3schools.com/PHP/php_file_upload.asp

see two links above

Medyman
10-29-2008, 11:04 PM
here where? here "here" or here up there?

yes my server supports php :)

thanks

lol. Sorry. I had the page open. I guess I just forgot to link it.

http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php

kosmasKosmakos
10-30-2008, 02:54 AM
lol. Sorry. I had the page open. I guess I just forgot to link it.

http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php

hihihi! its ok. thanks. i really apreciate it! :D

Megh
11-01-2008, 10:03 AM
thanx a lot:)