Autor Zpráva
Paret
Profil *
<?php
if (isset($_POST['odeslat'])){
$adresa = "mail@mail.cz";
$predmet = "Objednávka z webu";

$telo = "jmeno: " .$_POST['jmeno']. "\n";
$telo .= "email: " .$_POST['email']. "\n";
$telo .= "ulice: " .$_POST['ulice']. "\n";
$telo .= "mesto: " .$_POST['mesto']. "\n";
$telo .= "tel: " .$_POST['tel']. "\n";
$telo .= "psc: " .$_POST['psc']. "\n";
$telo .= "fax: " .$_POST['fax']. "\n";
$telo .= "stat: " .$_POST['stat']. "\n";
$telo .= "odden: " .$_POST['odden']. "\n";
$telo .= "odmesic: " .$_POST['odmesic']. "\n";
$telo .= "odrok: " .$_POST['odrok']. "\n";
$telo .= "doden: " .$_POST['doden']. "\n";
$telo .= "domesic: " .$_POST['domesic']. "\n";
$telo .= "dorok: " .$_POST['dorok']. "\n";
$telo .= "poznamka: " .$_POST['poznamka']. "\n";
$telo .= "pocetosob: " .$_POST['pocetosob']. "\n";

$odeslat_mail = @mail($adresa, $predmet, $telo);
echo "Zpráva byla odeslána";
}
?>

-------------------------------------------

<form method="POST" action="formular.php">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="6"><p><br>
<br>
</p></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong> Jméno a příjmení:
</strong></td>
<td><input name="jmeno" type="text" id="jmeno" size="32">
*</td>
<td>&nbsp;</td>
<td><strong>E-mail:</strong></td>
<td> <p>
<input name="email" type="text" id="email" onBlur="MM_validateForm('email','','NisEmail');return document.MM_returnValue">
* </p> </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Ulice: </td>
<td><input name="ulice" type="text" id="ulice" size="32">
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Město: </td>
<td><input name="mesto" type="text" id="mesto"></td>
<td>&nbsp;</td>
<td>Tel.: </td>
<td><input name="tel" type="text" id="tel"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>PSČ: </td>
<td><input name="psc" type="text" id="psc"></td>
<td>&nbsp;</td>
<td>Fax: </td>
<td><input name="fax" type="text" id="fax"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Stát: </td>
<td><input name="stat" type="text" id="stat"></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp; </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong>Termín od:</strong></td>
<td><select name="odden" id="odden">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="odmesic" id="odmesic">
<option value="leden">leden</option>
<option value="únor">únor</option>
<option value="březen">březen</option>
<option value="duben">duben</option>
<option value="květen">kveten</option>
<option value="červen">červen</option>
<option value="červenec">červenec</option>
<option value="srpen">srpen</option>
<option value="září" selected>září</option>
<option value="říjen">říjen</option>
<option value="listopad">listopad</option>
<option value="prosinec">prosinec</option>
</select>
<input name="odrok" type="text" id="odrok" value="2008" size="4">
*</td>
<td>&nbsp;</td>
<td> Poznámka:</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="style1">Termín </span><strong>do:</strong></td>
<td><select name="doden" id="doden">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option v
OnZ
Profil
Možná by nebylo na škodu napsat co ti nefunguje bo o co jde?
Paret
Profil *
Tak to sorry. Zpráva je příliš dlouhá a nevešla se. Jde o to, že se výpis neodešle na mail. Nemůžu přijít na to kde mám chybu. Díky za každou radu.
Paret
Profil *
Tak ještě jednou zkrácená verze formuláře

<?php
if (isset($_POST['odeslat'])){
$adresa = "mail@mail.cz";
$predmet = "Objednávka z webu";

$telo = "jmeno: " .$_POST['jmeno']. "\n";
$telo .= "email: " .$_POST['email']. "\n";
$telo .= "ulice: " .$_POST['ulice']. "\n";
$telo .= "mesto: " .$_POST['mesto']. "\n";
$telo .= "tel: " .$_POST['tel']. "\n";
$telo .= "psc: " .$_POST['psc']. "\n";
$telo .= "fax: " .$_POST['fax']. "\n";
$telo .= "stat: " .$_POST['stat']. "\n";
$telo .= "odden: " .$_POST['odden']. "\n";
$telo .= "odmesic: " .$_POST['odmesic']. "\n";
$telo .= "odrok: " .$_POST['odrok']. "\n";
$telo .= "doden: " .$_POST['doden']. "\n";
$telo .= "domesic: " .$_POST['domesic']. "\n";
$telo .= "dorok: " .$_POST['dorok']. "\n";
$telo .= "poznamka: " .$_POST['poznamka']. "\n";
$telo .= "pocetosob: " .$_POST['pocetosob']. "\n";

$odeslat_mail = @mail($adresa, $predmet, $telo);
echo "Zpráva byla odeslána";
}
?>

----------------------------------

<form method="POST" action="formular.php">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="6"><p><br>
<br>
</p></td>
</tr>
<tr>
<td><strong> Jméno a příjmení:
</strong></td>
<td><input name="jmeno" type="text" id="jmeno" size="32">
*</td>
<td><strong>E-mail:</strong></td>
<td> <p>
<input name="email" type="text" id="email" onBlur="MM_validateForm('email','','NisEmail');return document.MM_returnValue">
* </p> </td>
</tr>
<tr>
<td>Ulice: </td>
<td><input name="ulice" type="text" id="ulice" size="32">
</td>
</tr>
<tr>
<td>Město: </td>
<td><input name="mesto" type="text" id="mesto"></td>
<td>Tel.: </td>
<td><input name="tel" type="text" id="tel"></td>
</tr>
<tr>
<td>PSČ: </td>
<td><input name="psc" type="text" id="psc"></td>
<td>Fax: </td>
<td><input name="fax" type="text" id="fax"></td>
</tr>
<tr>
<td>Stát: </td>
<td><input name="stat" type="text" id="stat"></td>
</tr>
<tr>
<td><strong>Termín od:</strong></td>
<td><select name="odden" id="odden">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<select name="odmesic" id="odmesic">
<option value="leden">leden</option>
<option value="únor">únor</option>
</select>
<input name="odrok" type="text" id="odrok" value="2008" size="4">
*</td>
<td> Poznámka:</td>
</tr>
<tr>
<td><span class="style1">Termín </span><strong>do:</strong></td>
<td><select name="doden" id="doden">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<select name="domesic" id="domesic">
<option value="leden">leden</option>
<option value="únor">únor</option>
<option value="březen">březen</option>
</select>
<input name="dorok" type="text" id="dorok" value="2008" size="4">
*</td>
<td colspan="2" rowspan="2"><textarea name="poznamka" cols="34" rows="3" id="poznamka"></textarea></td>
</tr>
<tr>
<td><strong>Počet osob:</strong></td>
<td><input name="pocetosob" type="text" id="pocetosob">
*</td>
</tr>
<tr>
<td colspan="6">
<div align="right">
<input type="reset" name="Reset" value="Vymazat">
&nbsp;&nbsp;&nbsp;
<input name="tlacitko_odeslat" type="submit" id="tlacitko_odeslat4" lang="cs" value="Odeslat dotaz">
<input name="akce" type="hidden" id="akce" value="rezervace_CZ">
</div></td>
</tr>
</table>
</form>
Dědeček
Profil *
nebylo by špatné dát input select jen pomoci while

<select name="doden" id="odden" size="1">
      <option>-Vybrat-
      <?php 
      $i = 1;  
      while ($i <= 40): 
      echo "<option>" . $i; 
      $i++;  
      endwhile;  ?>
      </select>
Dědeček
Profil *
Jinak nikde nevidím odesláni toho mailu :D pouze jen definuješ porměnou ale nikde nevidim že by jsi ji pak použil

$telo .= "pocetosob: " .$_POST['pocetosob']. "\n";

mail($adresa, $predmet, $telo);
echo "Zpráva byla odeslána";
}
Paret
Profil *
mail($adresa, $predmet, $telo);
echo "Zpráva byla odeslána";
}

Asi jsem blb. Ale ani tohle nepomohlo.

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: