Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> co to oznacz ?
mefjiu
post
Post #1





Grupa: Zarejestrowani
Postów: 313
Pomógł: 5
Dołączył: 22.03.2005

Ostrzeżenie: (0%)
-----


mam skrypt logowania dziala nrmalnie ale jak go inluduje do indexu to wywala mi sie taki bład
Kod
Fatal error: Cannot redeclare class customsql in C:\Program Files\WebServ\httpd\CustomSql.inc.php on line 86


podam pliczek z bledem

  1. <?php
  2.  
  3.  
  4.  
  5. require("./DbSql.inc.php");
  6.  
  7. Class CustomSQL extends DBSQL
  8. {
  9.  // the constructor
  10.  function CustomSQL($DBName = "")
  11.  {
  12. $this->DBSQL($DBName);
  13.  }
  14.  
  15.  function checkusername($username)
  16.  {
  17. $sql = "select customerid from customer where username='$username'";
  18. $result = $this->select($sql);
  19. return $result;
  20.  }
  21.  
  22.  function adduser($username,$password,$email,$homepage,$icq,$aol,$yahoo,$msn,$location,$occupation,$interests,$biography)
  23.  {
  24. $sql = "insert into customer (username,password,email,homepage,icq,aol,yahoo,msn,location,occupation,inte
    rests,biography) values ('$username','$password','$email','$homepage','$icq','$aol','$yahoo','$msn','$location','$occupation','$interests','$biography')"
    ;
  25. $result = $this->insert($sql);
  26. return $result;
  27.  }
  28.  
  29.  function logincheck($username,$password)
  30.  {
  31. $sql = "select customerid from customer where username='$username' and password='$password'";
  32. $result = $this->select($sql);
  33. if (empty($result)) {
  34. return 0;
  35. }else{
  36. $CID = $result[0]["customerid"];
  37. return $CID;
  38. }
  39.  }
  40.  
  41.  function checkpassword($customerid,$password)
  42.  {
  43. $sql = "select customerid from customer where password='$password' and customerid='$customerid'";
  44. $result = $this->select($sql);
  45. if (empty($result)) {
  46. return 0;
  47. }else{
  48. $CID = $result[0]["customerid"];
  49. return $CID;
  50. }
  51.  }
  52.  
  53.  function emailcheck($email)
  54.  {
  55. $sql = "select password from customer where email='$email'";
  56. $result = $this->select($sql);
  57. if (empty($result)) {
  58. return 0;
  59. }else{
  60. $password = $result[0]["password"];
  61. return $password;
  62. }
  63.  }
  64.  
  65.  function getuserinfobyid($customerid)
  66.  {
  67. $sql = "select * from customer where customerid='$customerid'";
  68. $result = $this->select($sql);
  69. return $result;
  70.  }
  71.  
  72.  function edituser($email,$homepage,$icq,$aol,$yahoo,$msn,$location,$occupation,$interests,$biography,$customerid)
  73.  {
  74. $sql = "update customer set email='$email',homepage='$homepage',icq='$icq',aol='$aol',yahoo='$yahoo',msn='$msn',location='$location',occupation='$occupation',interests='$interests',biography='$biography' where customerid='$customerid'";
  75. $results = $this->update($sql);
  76. return $results;
  77.  }
  78.  
  79.  function modifypass($password,$customerid)
  80.  {
  81. $sql = "update customer set password='$password' where customerid='$customerid'";
  82. $results = $this->update($sql);
  83. return $results;
  84.  }
  85.  
  86. }
  87.  
  88. ?>


co mam z tym zrobic (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 10:48