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