PROGRESO | WEBESTEEM | ART&DESIGN MAGAZINE 
Forum webesteem Strona Główna webesteem:forum

   Regulamin | Szukaj | Użytkownicy | Grupy | Statystyki | Ostatnie tematy | RSS | Rejestracja | Profil | Skrzynka | Zaloguj

Mail z kilkoma załącznikami
Idź do strony Poprzedni  1, 2
 
Napisz nowy temat   Odpowiedz do tematu    Forum webesteem Strona Główna | server side i bazy danych
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
bielu




Od: 2011.05.26
Posty: 1

PostWysłany: 2011.05.26 12:55    Temat postu: tez mam z tym problem :(

zrobilem taki html
Kod:


<FORM NAME="zalacznik" METHOD="post" ACTION="xxx.php" ENCTYPE="multipart/form-data">

<div style="position: absolute; top:586px; left:495px; width:106px; height:22px;"  ID="mar" >

<input type="text" name="marka"  size="20" >

</div>


<div  style="position: absolute; top:586px; left:390px; width:78px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Marka&nbsp;pojazdu</span></div>


<div  style="position: absolute; top:616px; left:390px; width:78px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Model&nbsp;i&nbsp;typ</span></div>


<div style="position: absolute; top:616px; left:495px; width:106px; height:22px;"  ID="mod" >

<input type="text" name="model_typ"  size="20" >

</div>


<div  style="position: absolute; top:646px; left:390px; width:90px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Pojemno¶ć&nbsp;silnika</span></div>


<div style="position: absolute; top:646px; left:495px; width:106px; height:22px;"  ID="poj" >

<input type="text" name="pojemnosc_silnika"  size="20" >

</div>


<div  style="position: absolute; top:676px; left:390px; width:90px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Rodzaj&nbsp;silnika</span></div>


<div  style="position: absolute; top:706px; left:390px; width:90px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Przebieg&nbsp;(km)</span></div>


<div style="position: absolute; top:706px; left:495px; width:106px; height:22px;"  ID="przeb" >

<input type="text" name="przebieg"  size="20" >

</div>


<div  style="position: absolute; top:736px; left:390px; width:90px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Data&nbsp;produkcji</span></div>


<div style="position: absolute; top:736px; left:495px; width:147px; height:28px;"  ID="MenuRozwijalne_1" >

<select type="select" name="data_produkcji" size="1"><option value="2011" >2011</option><option value="2010" >2010</option><option value="2009" >2009</option><option value="2008" >2008</option><option value="2007" >2007</option><option value="2006" >2006</option><option value="2005" >2005</option><option value="2004" >2004</option><option value="2003" >2003</option><option value="2002" >2002</option><option value="2001" >2001</option><option value="2000" >2000</option><option value="1999" >1999</option><option value="1998" >1998</option><option value="1997" >1997</option><option value="1996" >1996</option><option value="1995" >1995</option><option value="1994" >1994</option><option value="1993" >1993</option><option value="1992" >1992</option><option value="1991" >1991</option><option value="1990" >1990</option><option value="1989" >1989</option><option value="1988" >1988</option><option value="1987" >1987</option><option value="1986" >1986</option><option value="1985" >1985</option><option value="1984" >1984</option><option value="1983" >1983</option><option value="1982" >1982</option><option value="1981" >1981</option><option value="1980" >1980</option></select>

</div>


<div  style="position: absolute; top:766px; left:390px; width:45px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Kolor</span></div>


<div style="position: absolute; top:766px; left:495px; width:106px; height:22px;"  ID="kol" >

<input type="text" name="kolor"  size="20" >

</div>


<div  style="position: absolute; top:796px; left:390px; width:90px; height:20px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Liczba&nbsp;drzwi</span></div>


<div style="position: absolute; top:796px; left:495px; width:106px; height:22px;"  ID="liczd" >

<input type="text" name="liczba_drzwi"  size="20" >

</div>


<div  style="position: absolute; top:826px; left:390px; width:93px; height:31px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Wyposażenie&nbsp;<br>dodatkowe</span></div>


<div style="position: absolute; top:826px; left:495px; width:106px; height:22px;"  ID="wyp" >

<input type="text" name="wyposazenie_dodatkowe"  size="20" >

</div>


<div  style="position: absolute; top:586px; left:695px; width:80px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Imie&nbsp;Nazwisko</span></div>


<div style="position: absolute; top:583px; left:790px; width:106px; height:22px;"  ID="imie" >

<input type="text" name="imie_nazwisko"  size="20" >

</div>


<div  style="position: absolute; top:616px; left:695px; width:80px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Miasto</span></div>


<div style="position: absolute; top:616px; left:790px; width:106px; height:22px;"  ID="mias" >

<input type="text" name="miasto"  size="20" >

</div>


<div  style="position: absolute; top:646px; left:695px; width:80px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Numer&nbsp;telefonu</span></div>


<div style="position: absolute; top:646px; left:790px; width:106px; height:22px;"  ID="nrtel" >

<input type="text" name="numer_telefonu"  size="20" >

</div>


<div  style="position: absolute; top:706px; left:695px; width:80px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Adres&nbsp;email</span></div>


<div style="position: absolute; top:706px; left:790px; width:106px; height:22px;"  ID="adresemail" >

<input type="text" name="adres_email"  size="20" >

</div>


<div  style="position: absolute; top:736px; left:695px; width:89px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Sugerowana&nbsp;cena</span></div>


<div style="position: absolute; top:736px; left:790px; width:106px; height:22px;"  ID="sugcen" >

<input type="text" name="sugerowana_cena"  size="20" >

</div>


<div  style="position: absolute; top:822px; left:645px; width:89px; height:18px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">Dodaj&nbsp;zdjęcie&nbsp;auta</span></div>


<div style="position: absolute; top:776px; left:740px; width:106px; height:22px;"  ID="zdj1" >
<input type="hidden" name="wyslij" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input type="file" name="plik[]" value="" size="20" >

</div>


<div style="position: absolute; top:806px; left:740px; width:106px; height:22px;"  ID="zdj2" >
<input type="hidden" name="wyslij" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input type="file" name="plik[]" value="" size="20" >

</div>


<div style="position: absolute; top:836px; left:740px; width:106px; height:22px;"  ID="zdj3" >
<input type="hidden" name="wyslij" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input type="file" name="plik[]" value="" size="20" >

</div>


<div style="position: absolute; top:866px; left:740px; width:106px; height:22px;"  ID="zdj4" >
<input type="hidden" name="wyslij" value="1" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
<input type="file" name="plik[]" value="" size="20" >

</div>


<div style="position: absolute; top:676px; left:495px; width:10px; height:10px;"  ID="odp" >

<input type="radio" name="odp" value="benzyna" >

</div>


<div style="position: absolute; top:676px; left:563px; width:10px; height:10px;"  ID="odp" >

<input type="radio" name="odp" value="diesel" >

</div>


<div style="position: absolute; top:676px; left:612px; width:10px; height:10px;"  ID="odp" >

<input type="radio" name="odp" value="LPG" >

</div>


<div  style="position: absolute; top:676px; left:514px; width:44px; height:15px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">benzyna</span></div>


<div  style="position: absolute; top:676px; left:581px; width:31px; height:15px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">diesel</span></div>


<div  style="position: absolute; top:676px; left:630px; width:31px; height:14px; text-align:left; vertical-align:top; background:; ">
<span style="font-family :Times New Roman, Times, serif;color :#000000;font-size :12px; font-weight : normal; font-style : normal; text-decoration: none;  line-height:normal;">LPG</span></div>


<div style="position: absolute; top:903px; left:655px; width:37px; height:21px;"  ID="Wyślij" >

<input type="submit" name="Wy¶lij" value="Wy¶lij" >


</form>

</div>


i taki plik xxx.php
Kod:
<?php
require_once 'class.phpmailer.php';

if($_POST['Wyślij']) {
$mail = new PHPMailer();
$mail->CharSet = "UTF-8";
$mail->Body = "marka: {$_POST['marka']}\r
model_typ: {$_POST['model_typ']}\r
pojemnosc_silnika: {$_POST['pojemnosc_silnika']}\r
przebieg: {$_POST['przebieg']}\r
data_produkcji: {$_POST['data_produkcji']}\r
kolor: {$_POST['kolor']}\r
liczba_drzwi: {$_POST['liczba_drzwi']}\r
wyposazenie_dodatkowe: {$_POST['wyposazenie_dodatkowe']}\r
imie_nazwisko: {$_POST['imie_nazwisko']}\r
miasto: {$_POST['miasto']}\r
numer_telefonu: {$_POST['numer_telefonu']}\r
adres_email: {$_POST['adres_email']}\r
sugerowana_cena: {$_POST['sugerowana_cena']}\r
odp: {$_POST['odp']}";
$mail->SetFrom($_POST['marka'], $_POST['imie_narwisko'].' '.$_POST['adres_email']);
$mail->AddAddress('bielupoland@interia.pl', 'bielu');
$mail->Subject = 'Testujemy...';

if(!empty($_FILES)) {
$fileCount = count($_FILES["plik"]["tmp_name"]);
$i = 0;
for($i; $i<$fileCount; $i++) {
$mail->AddAttachment($_FILES["plik"]["tmp_name"][$i], $_FILES["plik"]["name"][$i]);
}

if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
  }
}
}
?>


po naciśnięciu wyślij dostaje komunikat:
Fatal error: Call to undefined function: setfrom() in /var/www/sites//xxx.php on line 21
^
Odpowiedz z cytatem
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum webesteem Strona Główna | server side i bazy danych Wszystkie czasy w strefie EET (Europa)
Idź do strony Poprzedni  1, 2
Strona 2 z 2

 
Skocz do:  
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach

FAQ


serwery wirtualne, tanie domeny

Powered by phpBB © 2001, 2005 phpBB Group

90665005

Page generation time: 0.0325s (PHP: 82% - SQL: 18%) - SQL queries: 14 - GZIP enabled - Debug off