Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Formularz PHP
Forum PHP.pl > Forum > Gotowe rozwiązania
Adish90
Witam Serdecznie jestem nowy na forum wiec prosze o wyrozumiałośc moj problem dotyczy formularza http://olivia.nazwa.pl/form/ nie wiem czemu kiedy klikam na wyslij nic sie nie dzieje prisze o pomoc
Pozdrawiam Adrian ;]

Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Nie masz czasu na szukanie oferty ?</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script type="text/javascript" src="calendar.js"></script>
</head>
<body id="main_body" >
    
    <img id="top" src="top.png" alt="">
    <div id="form_container">
    
        <h1><a>Formularz kontaktowy</a></h1>
        <form id="form_8119" class="appnitro"  method="post" action="">
                    <div class="form_description">
            <h2>Nie Masz czasu na szukanie oferty</h2>
            <p>Wypełnij formularz - znajdziemy ją za Ciebie</p>
        </div>                        
            <ul >
            
                    <li id="li_9" >
        <label class="description" for="element_9">Imię I Nazwisko: </label>
        <div>
            <input id="element_9" name="element_9" class="element text medium" type="text" maxlength="255" value=""/>
        </div>
        </li>        <li id="li_8" >
        <label class="description" for="element_8">Numer Kontaktowy: </label>
        <div>
            <input id="element_8" name="element_8" class="element text medium" type="text" maxlength="255" value=""/>
        </div>
        </li>        <li id="li_1" >
        <label class="description" for="element_1">Preferowane kierunki: </label>
        <div>
            <input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/>
        </div><p class="guidelines" id="guide_1"><small>Pole Wymagane</small></p>
        </li>        <li id="li_10" >
        <label class="description" for="element_10">Wyjazd z: </label>
        <div>
        <select class="element select medium" id="element_10" name="element_10">
            <option value="1" selected="selected">Berlin</option>
<option value="2" >Bydgoszcz</option>
<option value="3" >Gdańsk</option>
<option value="4" >Katowice</option>
<option value="5" >Kraków</option>
<option value="6" >Poznań</option>
<option value="7" >Rzeszów</option>
<option value="8" >Szczecin</option>
<option value="9" >Warszawa</option>
<option value="10" >Wrocław</option>

        </select>
        </div><p class="guidelines" id="guide_10"><small>Wymagane</small></p>
        </li>        <li id="li_11" >
        <label class="description" for="element_11">Typ wycieczki: </label>
        <div>
        <select class="element select medium" id="element_11" name="element_11">
            <option value="" selected="selected"></option>
<option value="1" >wypoczynek</option>
<option value="2" >wypoczynek + zwiedzanie</option>
<option value="3" >zwiedzanie</option>
<option value="4" >narty</option>
<option value="5" >rejs</option>
<option value="6" >kolonie</option>
<option value="7" >kemping</option>

        </select>
        </div><p class="guidelines" id="guide_11"><small>Wymagane</small></p>
        </li>        <li id="li_12" >
        <label class="description" for="element_12"> Wyżywienie: </label>
        <div>
        <select class="element select medium" id="element_12" name="element_12">
            <option value="" selected="selected"></option>
<option value="1" >Bez wyżywienia (B)</option>
<option value="2" >Śniadania (BB)</option>
<option value="3" >Śniadania i obiadokolacje (HB)</option>
<option value="4" >Śniadania, obiady i kolacje (FB)</option>
<option value="5" >Wszystko w cenie (AI)</option>

        </select>
        </div>
        </li>        <li id="li_13" >
        <label class="description" for="element_13">Standard Hotelu: </label>
        <span>
            <input id="element_13_1" name="element_13_1" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_13_1">**</label>
<input id="element_13_2" name="element_13_2" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_13_2">***</label>
<input id="element_13_3" name="element_13_3" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_13_3">****</label>
<input id="element_13_4" name="element_13_4" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_13_4">*****</label>

        </span>
        </li>        <li id="li_2" >
        <label class="description" for="element_2">Termin Od: </label>
        <span>
            <input id="element_2_1" name="element_2_1" class="element text" size="2" maxlength="2" value="" type="text"> /
            <label for="element_2_1">MM</label>
        </span>
        <span>
            <input id="element_2_2" name="element_2_2" class="element text" size="2" maxlength="2" value="" type="text"> /
            <label for="element_2_2">DD</label>
        </span>
        <span>
             <input id="element_2_3" name="element_2_3" class="element text" size="4" maxlength="4" value="" type="text">
            <label for="element_2_3">YYYY</label>
        </span>
    
        <span id="calendar_2">
            <img id="cal_img_2" class="datepicker" src="calendar.gif" alt="Pick a date.">    
        </span>
        <script type="text/javascript">
            Calendar.setup({
            inputField     : "element_2_3",
            baseField    : "element_2",
            displayArea  : "calendar_2",
            button         : "cal_img_2",
            ifFormat     : "%B %e, %Y",
            onSelect     : selectDate
            });
        </script>
        
        </li>        <li id="li_3" >
        <label class="description" for="element_3">Termin Do: </label>
        <span>
            <input id="element_3_1" name="element_3_1" class="element text" size="2" maxlength="2" value="" type="text"> /
            <label for="element_3_1">MM</label>
        </span>
        <span>
            <input id="element_3_2" name="element_3_2" class="element text" size="2" maxlength="2" value="" type="text"> /
            <label for="element_3_2">DD</label>
        </span>
        <span>
             <input id="element_3_3" name="element_3_3" class="element text" size="4" maxlength="4" value="" type="text">
            <label for="element_3_3">YYYY</label>
        </span>
    
        <span id="calendar_3">
            <img id="cal_img_3" class="datepicker" src="calendar.gif" alt="Pick a date.">    
        </span>
        <script type="text/javascript">
            Calendar.setup({
            inputField     : "element_3_3",
            baseField    : "element_3",
            displayArea  : "calendar_3",
            button         : "cal_img_3",
            ifFormat     : "%B %e, %Y",
            onSelect     : selectDate
            });
        </script>
        
        </li>        <li id="li_4" >
        <label class="description" for="element_4">Ilość osób dorosłych:  </label>
        <div>
            <input id="element_4" name="element_4" class="element text medium" type="text" maxlength="255" value=""/>
        </div>
        </li>        <li id="li_5" >
        <label class="description" for="element_5">Ilość dzieci do 2 lat: </label>
        <div>
            <input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/>
        </div>
        </li>        <li id="li_6" >
        <label class="description" for="element_6"> Ilość dzieci od 2 lat: </label>
        <div>
            <input id="element_6" name="element_6" class="element text medium" type="text" maxlength="255" value=""/>
        </div>
        </li>        <li id="li_7" >
        <label class="description" for="element_7"> Twoje uwagi: </label>
        <div>
            <textarea id="element_7" name="element_7" class="element textarea medium"></textarea>
        </div>
        </li>
            
                    <li class="buttons">
                <input type="hidden" name="form_id" value="8119" />
                
                <input id="saveForm" class="button_text" type="submit" name="submit" value="Wyślij" />
        </li>
            </ul>
        </form>    
        <div id="footer">
            <a href=""></a>
        </div>
    </div>
    <img id="bottom" src="bottom.png" alt="">
    </body>
</html>


Przepraszam za post http://forum.php.pl/index.php?showtopic=15...t=0#entry787210 i prosze o jego usuniecie
lDoran
Daj kod html formularza i kod php, który ma to przechwycić.
adi456
w action daj np connect.php

utwórz plik a w nim php

  1. <?php
  2. if (count($_POST))
  3. {
  4.  
  5. $email = 'tu wpisz twojego maila';
  6. $subject = 'tu tytuł';
  7. $message = 'potwierdzenie wysłania';
  8. $error = 'tu komunikat gdy będzie błąd';
  9. $charset = 'tu kodowanie';
  10.  
  11.  
  12. $head =
  13. "MIME-Version: 1.0\r\n" ;
  14. $body = '';
  15. foreach ($_POST as $name => $value)
  16. {
  17. if (is_array($value))
  18. {
  19. for ($i = 0; $i < count($value); $i++)
  20. {
  21. $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value[$i]) : $value[$i]) . "\r\n";
  22. }
  23. }
  24. else $body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
  25. }
  26. echo mail($email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
  27. }
  28. ?>
Adish90
na poczte dostałem taka wiadomosc

Kod
element_9=Adrian Hartung
element_8=519860257
element_1=Berlin
element_10=3
element_11=2
element_12=5
element_13_3=1
element_2_1=09
element_2_2=8
element_2_3=2010
element_3_1=09
element_3_2=22
element_3_3=2010
element_4=1
element_5=0
element_6=0
element_7=Ogarnij
form_id=8119
submit=Wyślij


mogeto jakos zmodyfikowac questionmark.gif pozdrawiam Adrian
adi456
Napewno jest to możliwe ale niestety nie wiem jak, trzeba zaczekać na zainteresowanie zaawansowanego programisty, też jestem ciekawy tematu.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.