Błąd polega na tym że po kliknięciu Zarejestruj mnie powinno wysłać maila do mnie z danymi wpisanymi przez usera i przenieść go na stronę sukces.php
Maila wysyła ... ale na sukces.php nie przenosi
Wkleje kod HTML i PHP :
Plik rejestracja.php :
<?php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <base href="http://qaz.xorg.pl/rejestracja/"> <meta http-equiv="Content-Language" content="pl"> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2"> <meta http-equiv="PICS-Label" content='(PICS-1.0 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "admin@qaz.xorg.pl" for "http://qaz.xorg.pl/rejestracja/" on "2007.06.23T13:24+0100" exp "2010.12.31T23:59+0100" r (n 0 s 0 v 0 l 0))'> <meta http-equiv="Reply-to" content="admin@qaz.xorg.pl"> <meta name="Author" content="Administrator QAZ"> <meta name="Description" content="Rejestracja w całym QAZ !"> <meta name="Googlebot" content="NOSNIPPET"> <meta name="Robots" content="NOINDEX, NOFOLLOW"> <title>[QAZ] Rejestracja</title> </head> <body> <form action="krok2.php" enctype="multipart/form-data" method="post"> <table border="0"> <tr> <td><center>Imię :</center></td> <td><center><input name="IMIE" type="text"></center></td> </tr> <tr> <td><center>Nazwisko :</center></td> <td><center><input name="NAZWISKO" type="text"></center></td> </tr> <tr> <td><center>Data Urodzenia :</center></td> <td><center><input name="DATAURODZENIA" type="text"></center></td> </tr> <tr> <td><center><input name="EMAIL" type="text"></center></td> </tr> <tr> <td><center>Telefon komórkowy :</center></td> <td><center><input name="TELEFONKOMORKOWY" type="text"></center></td> </tr> <tr> <td><center>Telefon domowy :</center></td> <td><center><input name="TELEFONDOMOWY" type="text"></center></td> </tr> <tr> <td><center>Nick :</center></td> <td><center><input name="NICK" type="text"></center></td> </tr> <tr> <td><center>Hasło :</center></td> <td><center><input name="HASLO" type="password"></center></td> </tr> <tr> <td><center><input type="submit" value="Zarejestruj mnie"></center></td> <td><center><input type="reset" value="Usuń formularz"></center></td> </tr> </table> </form> </body> </html> ?>
Plik krok2.php :
<?php include("funkcja.php"); $errors=0; $error="Poniższe błędy uniemożliwiają poprawną kontynuacje !<ul>"; rejestracja('POST','IMIE'); rejestracja('POST','NAZWISKO'); rejestracja('POST','DATAURODZENIA'); rejestracja('POST','EMAIL'); rejestracja('POST','TELEFONKOMORKOWY'); rejestracja('POST','TELEFONDOMOWY'); rejestracja('POST','NICK'); rejestracja('POST','HASLO'); if($IMIE=="" || $NAZWISKO=="" || $DATAURODZENIA=="" || $EMAIL=="" || $TELEFONKOMORKOWY=="" || $TELEFONDOMOWY=="" || $NICK=="" || $HASLO=="" ){ $errors=1; $error.="<li>Nie wpisałeś odpowiedzi na wszystkie pytania !"; } if(!eregi("^[a-z0-9]+([_.-][a-z0-9]+)*" ."@"."([a-z0-9]+([.-][a-z0-9]+)*)+".".[a-z]{2,}"."$",$EMAIL)){ $error.="<li>Podałeś nieprawidłowy adres e-mail"; $errors=1; } else{ $message="IMIE: ".$IMIE." NAZWISKO: ".$NAZWISKO." DATAURODZENIA: ".$DATAURODZENIA." EMAIL: ".$EMAIL." TELEFONKOMORKOWY: ".$TELEFONKOMORKOWY." TELEFONDOMOWY: ".$TELEFONDOMOWY." NICK: ".$NICK." HASLO: ".$HASLO." "; mail("admin@qaz.xorg.pl","Rejestracja",$message,"From: <a href="http://qaz.xorg.pl/rejestracja");" target="_blank">http://qaz.xorg.pl/rejestracja");</a> ?> <?php } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <base href="http://qaz.xorg.pl/rejestracja/"> <meta http-equiv="Content-Language" content="pl"> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2"> <meta http-equiv="PICS-Label" content='(PICS-1.0 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "admin@qaz.xorg.pl" for "http://qaz.xorg.pl/rejestracja/" on "2007.06.23T13:24+0100" exp "2010.12.31T23:59+0100" r (n 0 s 0 v 0 l 0))'> <meta http-equiv="Reply-to" content="admin@qaz.xorg.pl"> <meta name="Author" content="Administrator QAZ"> <meta name="Description" content="Rejestracja w całym QAZ !"> <meta name="Googlebot" content="NOSNIPPET"> <meta name="Robots" content="NOINDEX, NOFOLLOW"> <title>[QAZ] Rejestracja</title> </head> <body> <center><h1>Co tu robisz ?</h1></center> </body> </html>
i plik funkcja.php :
<?php function rejestracja() { if ($num_args >= 2) { if (($method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'ENV')) { die('Pierwszy argument rejestracji musi być następujący : GET, POST, SESSION, SERVER, COOKIE, lub ENV'); } $varname = "HTTP_{$method}_VARS"; for ($i = 1; $i < $num_args; $i++) { $$parameter = ${$varname}[$parameter]; } } } else { } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <base href="http://qaz.xorg.pl/rejestracja/"> <meta http-equiv="Content-Language" content="pl"> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2"> <meta http-equiv="PICS-Label" content='(PICS-1.0 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "admin@qaz.xorg.pl" for "http://qaz.xorg.pl/rejestracja/" on "2007.06.23T13:24+0100" exp "2010.12.31T23:59+0100" r (n 0 s 0 v 0 l 0))'> <meta http-equiv="Reply-to" content="admin@qaz.xorg.pl"> <meta name="Author" content="Administrator QAZ"> <meta name="Description" content="Rejestracja w całym QAZ !"> <meta name="Googlebot" content="NOSNIPPET"> <meta name="Robots" content="NOINDEX, NOFOLLOW"> <title>[QAZ] Rejestracja</title> </head> <body> <center><h1>Co tu robisz ?</h1></center> </body> </html>