Compare commits
2 Commits
51879a3591
...
b085e7db16
| Author | SHA1 | Date | |
|---|---|---|---|
| b085e7db16 | |||
| 2d4ab3cf4b |
22
register.php
22
register.php
@ -10,29 +10,31 @@ Poniższy formularz trafi do naszych administratorów, którzy go ocenią. Potra
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label>Nick*</label>
|
<label>Nick*</label>
|
||||||
<input name="nick" type="string" min=3 max=20 required>
|
<input name="nick" type="string" min=3 max=20 pattern="[a-zA-Z0-9]+" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label>Strona WWW</label>
|
<label>Strona WWW</label>
|
||||||
<input name="www">
|
<input name="url" type="url">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label>Jak do nas trafiłeś?</label>
|
<label>Jak do nas trafiłeś?</label>
|
||||||
<select name="how" required>
|
<select name="how" required>
|
||||||
<option selected></option>
|
<option selected></option>
|
||||||
<option>inny użytkownik tyldy</option>
|
<option>komunikator (np. matrix, irc, xmpp)</option>
|
||||||
<option>wyszukiwarka</option>
|
<option>wyszukiwarka</option>
|
||||||
<option>tildeeverse.org</option>
|
<option>tildeeverse.org</option>
|
||||||
<option>promocja w internecie</option>
|
<option>promocja w internecie</option>
|
||||||
</select>
|
<option>polecenie</option>
|
||||||
|
<option>inne</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label>Zainteresowania</label>
|
<label>Zainteresowania</label>
|
||||||
<textarea name="interests"></textarea>
|
<textarea name="interests" maxlength=1000></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label>Opowiedz coś na swój temat</label>
|
<label>Opowiedz coś na swój temat</label>
|
||||||
<textarea name="who" rows=8></textarea>
|
<textarea name="who" rows=8 maxlength=1000"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
|
|||||||
@ -3,18 +3,36 @@ include 'header.php';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
Hej <strong><?php $nick=$_POST["nick"]; printf("%s", "$nick"); ?></strong>!
|
Hej
|
||||||
|
<strong>
|
||||||
|
<?php printf("%s", htmlspecialchars($_POST["nick"])); ?>
|
||||||
|
</strong>!
|
||||||
<br><br>
|
<br><br>
|
||||||
Otrzymaliśmy twój formularz rejestracji. Oczekuj na dalsze informacje na swojej skrzynce mailowej. :)
|
Otrzymaliśmy twój formularz rejestracji. Oczekuj na dalsze informacje na swojej skrzynce mailowej. :) Odpowiedź może potrwać kilka dni, w zależności od oczekującej liczby użytkowników.
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$nick=$_POST["nick"];
|
$nick=htmlspecialchars($_POST["nick"]);
|
||||||
|
$email=htmlspecialchars($_POST["email"]);
|
||||||
|
$url=htmlspecialchars($_POST["url"]);
|
||||||
|
$who=htmlspecialchars($_POST["who"]);
|
||||||
|
$how=htmlspecialchars($_POST["how"]);
|
||||||
|
$interests=htmlspecialchars($_POST["interests"]);
|
||||||
|
|
||||||
$to = 'smoorg@tylda.org';
|
$to = 'smoorg@tylda.org';
|
||||||
$subject = 'Rejestracja usera' . "$nick";
|
$subject = 'Rejestracja usera' . "$nick";
|
||||||
$message = 'Nick' . $_POST["nick"] . "\n" . 'Email' . $_POST["email"]
|
$message = "Nick: $nick\n" .
|
||||||
|
"Email: $email\n" .
|
||||||
|
"Url: $url\n" .
|
||||||
|
"Opowiedz coś na swój temat: $who\n" .
|
||||||
|
"Jak do nas trafiłeś?: $how\n" .
|
||||||
|
"Zainteresowania: $interests\n"
|
||||||
;
|
;
|
||||||
$headers = 'X-Mailer: PHP/' . phpversion();
|
$headers = array(
|
||||||
|
'From' => 'noreply@tylda.org',
|
||||||
|
'Reply-To' => 'noreply@tylda.org',
|
||||||
|
'X-Mailer' => 'PHP/' . phpversion()
|
||||||
|
);
|
||||||
|
|
||||||
mail($to, $subject, $message, $headers);
|
mail($to, $subject, $message, $headers);
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user