|
SWiSH Forum Forum użytkowników programów SWiSH |
|
Webdesign, HTML, technologie - Fromularz kontaktowy + wysyłanie załączonego pliku/jpg
mobby - Sro 30 Mar, 2011 14:05 Temat postu: Fromularz kontaktowy + wysyłanie załączonego pliku/jpg Witam,
mam taki skrypt w php i chciałbym dodać do niego możliwość załączenia wskazanego z dysku pliku, ma to być jpg o rozmiarze 1mb:
<?php
$DEFAULT_EXIT_PAGE = "wyslane.html";
$quantitypcs = $_POST['quantitypcs'];
$plugtype = $_POST['plugtype'];
$connectortype = $_POST['connectortype'];
$cabletype = $_POST['cabletype'];
$quantityofwires = $_POST['quantityofwires'];
$colour = $_POST['colour'];
$totalofpowercord = $_POST['totalofpowercord'];
$lod1 = $_POST['lod1'];
$lod2 = $_POST['lod2'];
$lod3 = $_POST['lod3'];
$lwos1 = $_POST['lwos1'];
$lwos2 = $_POST['lwos2'];
$lwos3 = $_POST['lwos3'];
$tinning = $_POST['tinning'];
$terminala = $_POST['terminala'];
$terminalb = $_POST['terminalb'];
$terminalc = $_POST['terminalc'];
$toh = $_POST['toh'];
$from = stripslashes($from);
$sendTo = "ask@me.pl";
$subject = "Enquiry";
$msg_body = "QUANTITY PCS: $quantitypcs <br />";
$msg_body .= "PLUG TYPE: $plugtype<br />";
$msg_body .= "CONNECTOR TYPE: $connectortype<br />";
$msg_body .= "CABLE TYPE: $cabletype<br />";
$msg_body .= "QUANTITY OF WIRES X SECTION mm2: $quantityofwires<br />";
$msg_body .= "COLOUR: $colour<br />";
$msg_body .= "TOTAL OF POWER CORD - L mm: $totalofpowercord<br />";
$msg_body .= "LENGHT OF DISMANTLING - L1 mm: $lod1<br />";
$msg_body .= "LENGHT OF DISMANTLING - L2 mm: $lod2<br />";
$msg_body .= "LENGHT OF DISMANTLING - L3 mm: $lod3<br />";
$msg_body .= "LENGHT WIRES OF STRIPPING - A1 mm: $lwos1<br />";
$msg_body .= "LENGHT WIRES OF STRIPPING - A2 mm: $lwos2<br />";
$msg_body .= "LENGHT WIRES OF STRIPPING - A3 mm: $lwos3<br />";
$msg_body .= "TINNING: $tinning<br />";
$msg_body .= "TERMINALS-SUPPLIER AND CODE - A: $terminala<br />";
$msg_body .= "TERMINALS-SUPPLIER AND CODE - B: $terminalb<br />";
$msg_body .= "TERMINALS-SUPPLIER AND CODE - C: $terminalc<br />";
$msg_body .= "TYPE OF HANKING: $toh<br />";
$header_info = 'From: '.$quantitypcs.' <'.$toh.'>'."\r\n";
$header_info .= 'To: '.$sendTo."\r\n";
$header_info .= 'MIME-Version: 1.0'."\r\n";
$header_info .= 'Content-Type: text/html; charset=iso-8859-2'."\r\n";
mail($sendTo, $subject, $msg_body, $header_info);
if(! $exit_page)
$exit_page = $DEFAULT_EXIT_PAGE;
Header("Location: ".$exit_page);
?>
Nie znam się na php, proszę o pomoc.
Pozdrawiam
Januszr - Sro 30 Mar, 2011 14:07
Może na forum PHP było by lepiej zapytać?
|
|