<?php
if (empty($_POST['submit'])) { echo "<table border=\"0\"><form method=\"post\">
<tr>
<td>ID Zgłoszenia:</td>
<td><input type=\"text\" value=\"<?php include('identyfikator.php'); ?>\" name=\"ID\" style=\"width: 100px\"></td> <- (tu nie działa)
</tr>
<td>Imię i Nazwisko</td>
<td><input type=\"text\" name=\"imie\" style=\"width: 250px\"></td>
</tr>
<tr>
<td>Adres e-mail</td>
<td><input type=\"text\" name=\"email\" style=\"width: 250px\"></td>
</tr>
<tr>
<td>Treść wiadomości</td>
<td><textarea name=\"tresc\" style=\"width: 250px; height: 100px\"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type=\"submit\" name=\"submit\" value=\"Wyślij\">
<input type=\"reset\" value=\"Wyczyść\"></td></form>
</tr>
</table>";
}
elseif (!empty($_POST['tresc']) && !empty($_POST['imie']) && !empty($_POST['email'])) { $message = "ID zgłoszenia:\n$_POST[ID]\nWysłał: $_POST[imie]\ne-mail: $_POST[email]\nTreść wiadomości: $_POST[tresc]"; $header = "From: $_POST[imie] $_POST[ID] <$_POST[email]>"; @mail("boczek.zg(małpa)gmail.com","Wiadomosc z Supportu Klienta","$message","$header") or die('Nie udało się wysłać wiadomości'); echo "<div align=\"center\"><strong>Wiadomość została wysłana poprawnie!</strong></div>";
}
else echo "<span style=\"color: #FF0000; text-align: center;\">Wypełnij wszystkie pola formularza!</span>";
?> <?php
if (empty($_POST['submit'])) { ?> <table border="0"><form method="post">
<tr>
<td>ID Zgłoszenia:</td>
<td><input type="text" value="<?php include('identyfikator.php'); ?>" name="ID" style="width: 100px"></td>
</tr>
<td>Imię i Nazwisko</td>
<td><input type="text" name="imie" style="width: 250px"></td>
</tr>
<tr>
<td>Adres e-mail</td>
<td><input type="text" name="email" style="width: 250px"></td>
</tr>
<tr>
<td>Treść wiadomości</td>
<td><textarea name="tresc" style="width: 250px; height: 100px"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Wyślij">
<input type="reset" value="Wyczyść"></td></form>
</tr>
</table>
<?php
}
elseif (!empty($_POST['tresc']) && !empty($_POST['imie']) && !empty($_POST['email'])) { $message = "ID zgłoszenia:\n$_POST[ID]\nWysłał: $_POST[imie]\ne-mail: $_POST[email]\nTreść wiadomości: $_POST[tresc]"; $header = "From: $_POST[imie] $_POST[ID] <$_POST[email]>"; @mail("boczek.zg(małpa)gmail.com","Wiadomosc z Supportu Klienta","$message","$header") or die('Nie udało się wysłać wiadomości'); echo "<div align=\"center\"><strong>Wiadomość została wysłana poprawnie!</strong></div>";
}
else echo "<span style=\"color: #FF0000; text-align: center;\">Wypełnij wszystkie pola formularza!</span>";
?> <?php
$_echo = '';
for($i=0;$i<10;$i++)
{
$_echo .= $i;
}
return $_echo; <?php echo include('identyfikator.php'); | | PHP Cheat Sheet | Aplikacje Android Edukacja | 0 Odpowiedzi |