Register for your free account! | Forgot your password?

You last visited: Today at 17:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



HTML help

Discussion on HTML help within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
HTML help

hey guys so my contact form have all this futures.



and now i want to add one more future. i can also upload a file from my desktop to contact form and when i click send it send everything to my email.


here is the code.



any help will be nice.


note:

just made a simple one. what do you guys think.

<div>
<form method='POST' enctype='multipart/form-data' action='fup.cgi'>
File to upload: <input type=file name=upfile><br>
<br>
</form>
<div>
LordGragen. is offline  
Old 11/13/2013, 10:46   #2

 
Ravenstorm's Avatar
 
elite*gold: 0
The Black Market: 100/0/0
Join Date: Jan 2010
Posts: 13,150
Received Thanks: 3,207
At first you should set your code in a post form cause as you said you want to send a mail with this informations.
After this you can add a input for the Upload wrote a short code for it.
PHP Code:
Upload:<input type="file" name="file">
<input type="submit" name="send" value="Submit">

<?php
if($_POST['send']){
   
move_uploaded_file($_FILES['file']['tmp_name'],$to);
}
?>
Thats the code for moving your file to add it to a mail you should take a look at "phpMailer".

After this you can take a simple code for adding the file as an attachment
PHP Code:
    //Data-Path
    
$fileName $_FILES['file']['name'];
    
$filePath $_FILES['file']['tmpname'];
    
    
$mail->AddAttachment($filePath$fileName); 
Ravenstorm is offline  
Old 11/16/2013, 10:50   #3
 
elite*gold: 0
Join Date: Jun 2007
Posts: 96
Received Thanks: 12
but careful and hide the uploaded files location from the visitors since anyone can upload shells
atef201080 is offline  
Reply


Similar Threads Similar Threads
html/javasript/html frage
08/03/2013 - Web Development - 8 Replies
Heyho epvpers, Ich hätte eine frage an euch über eine homepage. Unswar wenn man so an links an die seite mit der Maus geht,kommt ein z.B. Teamspeak3 viewer rausgefahren und das wollte ich fragen wie ich das mache und eventuel mir einer da ein script schicken kann wäre nett. Danke im vorraus! Mit freundlichen grüßen: Phillip
[Joomla][HTML] modul in einer html datei verlinken?
11/11/2011 - Web Development - 1 Replies
ich hab vorher im joomla forum schon ein thread geöffnet aber da antwortet mir niemand und ich ich langsam keine gedult mehr.. will heute noch weiter probieren und so. ---------------------------------------- Bei den Modulen gibt es ein leeres, wo man ein editor hat. Ist es möglich eine verlinkung zum modul in der html zu machen? Hier ein beispiel vom aufbau meiner website: Vorstellung wie die website ungefähr sein soll, wo ich welche div container gemacht habe, wie das ganze zur zeit...
HTML
10/01/2009 - Main - 3 Replies
Hi ich wusste nicht genau wo das hinkommt also poste ich es erstmal hier wenn falsch pls moven... Und zwar weiß ich net wie ich bei meinem HTML Formular zum ausfüllen so einrichten kann , das dass ausgefüllte Formular an meine Email - Adresse gesendet wird , per Abschick Button. Ich bitte um Hilfe :handsdown: Grüße
[HTML]HELP[/HTML]range hack and skill speed in extreme
08/21/2009 - Dekaron Private Server - 5 Replies
hey guys i need a little help about range hack and skill speed in extreme i already unpack the Data its all done..1! my problem is wer i can edit the range ang skill speed in extreme..! pls :):):):):)



All times are GMT +2. The time now is 17:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.