PHP File Upload script [1-n] fisiere
Scris: Dum Noi 03, 2013
Pe codul de mai jos, de ceva timp ma lup sa imi inserez in scrip, FILE UPLOAD (1-n fisiere, pdf, jpg, doc, docx rar win etc. )
Mentionez ca am citit toate topicurile si cursurile, dar nu-mi iasa.
Mentionez ca am citit toate topicurile si cursurile, dar nu-mi iasa.
Cod: Selectaţi tot
<?php
if(isset($_POST['submit'])) {
$to = "EMAIL";
$dropdown = $_POST['drop_down'];
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phone'];
$cod = intval(file_get_contents('codmail.txt')) + 1;
$subject = "[#".$cod."] TEXT-".$name_field;
$body ="From: $name_field\n Interes: $dropdown\n E-Mail: $email_field\n Ip: $ip\n Telefon: $phone_field\n";
if(mail($to, $subject, $body, $headersMe)) {
file_put_contents('codmail.txt', $cod);
header('Location: ../Accept.html');
}
} else {
header('Location: ../Reject.html');
}
?>