![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 21 Pomógł: 0 Dołączył: 10.06.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam, czy ktoś mógłby mi powiedzieć jak do robić do poniższego skryptu rejestracji, aktywacje zarejestrowanego konta poprzez link w nadesłanym email ?
Kod <?php include'zawartosc.php' ?>
<? /** * Register.php * * Displays the registration form if the user needs to sign-up, * or lets the user know, if he's already logged in, that he * can't register another name. * * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC) * Last Updated: August 19, 2004 */ include("include/session.php"); ?> <html> <title>Registration Page</title> <body> <? /** * The user is already logged in, not allowed to register. */ if($session->logged_in){ echo "<b>Komplikacja</b>"; echo "<p>Twoje konto <b>$session->username</b>, jest aktualnie zalogowane.<br>Aby zarejestrować się musisz wpierw wylogować się!<br><br> " ."<a href=\"main.php\">Powrót do konta</a>.</p>"; } /** * The user has submitted the registration form and the * results have been processed. */ else if(isset($_SESSION['regsuccess'])){ /* Registration was successful */ if($_SESSION['regsuccess']){ echo "<b>Zostałeś pomyślnie zarejestrowany !</b>"; echo "<p>Dziękujemy za zarejestrowanie się. Twoje konto <b>".$_SESSION['reguname']."</b> jest już aktywne i możesz się" ." <a href=\"main.php\">zalogować</a>.</p>"; } /* Registration failed */ else{ echo "<b>Komplikacja</b>"; echo "<p>Błąd tworzenia konta <b>".$_SESSION['reguname']."</b>, " ."spróbuj zarejestrować się później!<br>Przepraszamy za kłopoty techniczne."; } unset($_SESSION['regsuccess']); unset($_SESSION['reguname']); } /** * The user has not filled out the registration form yet. * Below is the page with the sign-up form, the names * of the input fields are important and should not * be changed. */ else{ ?> <b>Rejestracja</b><p> <? if($form->num_errors > 0){ echo "<td>Znaleziono ".$form->num_errors." błedów</td>"; } ?> <form action="process.php" method="POST"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr><td>Pseudo:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr> <tr><td>Hasło:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr> <tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr> <tr><td colspan="2" align="right"> <input type="hidden" name="subjoin" value="1"> <input type="submit" value="Zarejestruj"></td></tr> <tr><td colspan="2" align="left"><a href="main.php">Powrót do logowania</a></td></tr> </table> </form> <? } ?> </body> </html> <?php include'koniec.php' ?> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 23.08.2025 - 13:02 |