![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 16.02.2009 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
W tej linijce Kod $this->c=@mysql_query("select username from users where username='$susername'"); Jest następujący błąd: Kod Fatal error: Using $this when not in object context in /home/fotozrzut/domains/fotozrzut.pl/public_html/rejestracja.php on line 38 Bardzo proszę o pomoc (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Ten post edytował Zmyslak 16.02.2009, 22:57:32 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 16.02.2009 Ostrzeżenie: (0%) ![]() ![]() |
Od tego momentu nie działa. Nie cały bo za długi. Jest mniej więcej ten błędny kod.
Kod } else if($submit3) {
if(!ereg("^[A-Za-z0-9_]{1,16}$",$susername)) { $serror="Błędna nazwa! Możesz użyć malsymalnie 15 znaków. Możesz używać liter, cyfer i kropek.<br>"; } $this->c=@mysql_query("select username from users where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Podany login jest już zajęty.<br>"; } $this->c=@mysql_query("select username from users where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Podany login jest już zajęty.<br>"; } if (!$serror) { mt_srand((double)microtime()*1000000^getmypid()); $pass_length = mt_rand($this->min_pass_length,$this->max_pass_length); while(strlen($spassword)<$pass_length) { $spassword.=substr($this->chars,(mt_rand()%strlen($this->chars)),1); } include("include/email.php"); $signupmessage=str_replace("<username>","$susername",$signupmessage); $signupmessage=str_replace("<password>","$spass",$signupmessage); $signupmessage=str_replace("<bupass>","$bupass",$signupmessage); $adminsignupmessage = str_replace("<member_email>","$semail",$adminsignupmessage); $subject = "$signupsubject"; $message = "$signupmessage"; mail($semail,$subject,$message,"From: $adminemail"); $adminsignupsubject=str_replace("<username>","$susername",$adminsignupsubject); $adminsignupmessage = str_replace("<username>","$susername",$adminsignupmessage); $adminsignupmessage = str_replace("<password>","$spass",$adminsignupmessage); $adminsignupmessage = str_replace("<bupass>","$bupass",$adminsignupmessage); $adminsignupmessage = str_replace("<member_email>","$semail",$adminsignupmessage); $subject = "$adminsignupsubject"; $message = "$adminsignupmessage"; mail($adminemail,$subject,$message,"From: $adminemail"); $nowdate = date("M d, Y"); mysql_query("insert into users (uid, username, password, email, last_paid, signup_date) values ('','$susername', '$spass', '$semail', 'free', '$nowdate')"); echo "<h3>Zakładanie nowego konta Krok 3 - Zakończone</h3> $table2 <tr><td align=center>Dziękujemy za doł±czenie do grona użytkowników $sitename. Na podany przez Ciebie email (<b>$semail</b>) została wysłana wiadomo¶ć z danymi konta. </table>"; } |
|
|
![]() ![]() |
![]() |
Aktualny czas: 18.10.2025 - 08:46 |