Kod
Fatal error: Cannot redeclare class customsql in C:\Program Files\WebServ\httpd\CustomSql.inc.php on line 86
podam pliczek z bledem
<?php require("./DbSql.inc.php"); Class CustomSQL extends DBSQL { // the constructor function CustomSQL($DBName = "") { $this->DBSQL($DBName); } function checkusername($username) { $sql = "select customerid from customer where username='$username'"; $result = $this->select($sql); return $result; } function adduser($username,$password,$email,$homepage,$icq,$aol,$yahoo,$msn,$location,$occupation,$interests,$biography) { $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')"; $result = $this->insert($sql); return $result; } function logincheck($username,$password) { $sql = "select customerid from customer where username='$username' and password='$password'"; $result = $this->select($sql); return 0; }else{ $CID = $result[0]["customerid"]; return $CID; } } function checkpassword($customerid,$password) { $sql = "select customerid from customer where password='$password' and customerid='$customerid'"; $result = $this->select($sql); return 0; }else{ $CID = $result[0]["customerid"]; return $CID; } } function emailcheck($email) { $sql = "select password from customer where email='$email'"; $result = $this->select($sql); return 0; }else{ $password = $result[0]["password"]; return $password; } } function getuserinfobyid($customerid) { $sql = "select * from customer where customerid='$customerid'"; $result = $this->select($sql); return $result; } function edituser($email,$homepage,$icq,$aol,$yahoo,$msn,$location,$occupation,$interests,$biography,$customerid) { $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'"; $results = $this->update($sql); return $results; } function modifypass($password,$customerid) { $sql = "update customer set password='$password' where customerid='$customerid'"; $results = $this->update($sql); return $results; } } ?>
co mam z tym zrobic
