Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pole wyboru, jak to zrobić?
pjamorski
post
Post #1





Grupa: Zarejestrowani
Postów: 112
Pomógł: 0
Dołączył: 16.01.2008

Ostrzeżenie: (0%)
-----


Witam,

Zapodam kawałek kodu, ten szablon wysyłany jest na wskazany adres email:

Kod
  $wiadomosc = "
                 <html><head>
                 <title>zamówienie klienta</title>
                 </head>
                 <body>
                 Zamówienie zostało wysłane
                



                 <table border='0' bgcolor='yellow'>
                 <tr><td width='150' align='center'><b>Imie</td><td width='150' align='center'><b>Nazwisko</td><td width='150' align='center'><b>Email</td><td width='150' align='center'><b>Telefon</td><td width='300' align='center'><b>Treść zamówienia</td></tr>
                 <tr><td width='150' align='center'>$name_person</td><td width='150' align='center'>$surname_person</td><td width='150' align='center'>$email_person</td><td width='150' align='center'>$phone_person</td><td width='300' align='center'>$text
                 </td></tr></table>
                 </body></html>
         ";


W formularzu mam pole wybory, nie wiem jak moge jako ostatniąpozycję w tym formularzu zapisać wybrane pozycje z pola wyboru. Mam taką pętle:

Kod
foreach($_POST['wybor1[]'] as $wybierz)
         {
            
         }


Próbowałem w jej klamrach ten szablon umieścić i podać zmienną $wybierz jako ostatnia pozycja, lecz nie dało rady.
Czyli tak:

Kod
foreach($_POST['wybor1[]'] as $wybierz)
        {
            
        
        $wiadomosc = "
                <html><head>
                <title>zamówienie klienta</title>
                </head>
                <body>
                Zamówienie zostało wysłane
                <br><br><br>
                <table border='0' bgcolor='yellow'>
                <tr><td width='150' align='center'><b>Imie</td><td width='150' align='center'><b>Nazwisko</td><td width='150' align='center'><b>Email</td><td width='150' align='center'><b>Telefon</td><td width='300' align='center'><b>wybrana usługa</td></tr>
                <tr><td width='150' align='center'>$name_person</td><td width='150' align='center'>$surname_person</td><td width='150' align='center'>$email_person</td><td width='150' align='center'>$phone_person</td><td width='300' align='center'>$wybierz
                </td></tr></table>
                </body></html>
        ";

        }



Mógłbym prosić o podpowiedź, albo drobne rozwiązanie problemiku?

dzięki, pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 13:14