Fatal error: Cannot redeclare class / Include extern .php
<p>I'm very new to PHP and I got the following problem:
Everytime I want to run my file, I get this err message: "Fatal error: Cannot redeclare class Customer in /home/www/p161/html/customer-class.php on line 2"</p>

<p>My Code looks like this:</p>

<pre><code>    &lt;?php
    include 'customer-class.php';

    function crateConnection(){
        $database_url = "pdb1.pretago.de";
        $username = "p161";
        $password = "mJMmTGPR";
        $db_name = "usr_p161_1";
        //Verbindung zur Datenbank herstellen und setzen  des ERRORMODE, damit Exceptions abgefangen
        //werden können.
        $connection = new PDO("mysql:host=$database_url;dbname=$db_name", $username, $password);
        $connection-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        return $connection;
    }

    function isInDB($customer, $connection){
        $stmt = $connection-&gt;prepare("SELECT * FROM Customer WHERE mailadresse = :emailaddress ");
        $stmt-&gt;bindParam(':emailaddress', $customer-&gt;email);
        $stmt-&gt;execute();
        if($stmt-&gt;rowCount() == 0){
            return false;
        }else{
            return true;
        }
    }

    function insert($customer, $connection){
        $statement = $connection-&gt;prepare("INSERT INTO Customer (vorname, nachname, strasse, stadt, plz, mailadresse, telefon) VALUES (?,?,?,?,?,?,?)"); 
        //Query ausführen
        $statement-&gt;execute($customer-&gt;getDataToStore()) or die("SQL Error: ".$statement-&gt;queryString." - ".$statement-&gt;errorInfo()[2]);
        //Verbindung schließen
        $connection = null;
    }
?&gt;
</code></pre>

<p>db-methods.php</p>

<pre><code>    &lt;?php
    include 'customer-class.php';
    include 'db-methods.php';

    /*
     * Diese Funktion lädt die Form Daten in ein Customer Objekt
     */
    function getCustomer(){
        $fname = $_POST["fname"];
        $lname = $_POST["lname"];
        $street = $_POST["street"];
        $city = $_POST["city"];
        $place = $_POST["place"];
        $email = $_POST["email"];
        $phone = $_POST["phone"];
        $message = $_POST["message"];
        return new Customer($fname, $lname, $street, $city, $place, $email, $phone, $message);
    }

    function sendMail($customer){
        $empfaenger = "c.torluccio@gmx.de";
        $betreff = "Kontaktformular von Ihrer Homepage";
        $from = "Von $customer-&gt;fname, $customer-&gt;lname &lt;$customer-&gt;email&gt;";
        $text = $customer-&gt;message;
        mail($empfaenger, $betreff, $text, $from);
    }


    try{
        $connection = createConnection();
        //Laden der Form Daten in ein Customer Objekt
        $customer = getCustomer();
        if(!isInDB($customer, $connection)){
            insert($customer, $connection);
        }
        //E-Mail versenden
        //sendMail($customer);
        header( 'Location: http://p161.prtg1.pretago.de/wordpress/testseite-fuer-db/');
        exit();
    }catch(PDOException $exception){ 
        echo "Verbdinung fehlgeschlagen: " . $exception-&gt;getMessage();  
    }



?&gt;
</code></pre>

<p>contact-form.php</p>

<pre><code>    &lt;?php
class Customer{
    var
        $fname,$lname,
        $street, $city,
        $place,
        $email, $phone,
        $message;

    function Customer($fname, $lname, $street, $city, $place, $email, $phone, $message){
        $this-&gt;fname = $fname;
        $this-&gt;lname = $lname;
        $this-&gt;street = $street;
        $this-&gt;city = $city;
        $this-&gt;place = $place;
        $this-&gt;email = $email;
        $this-&gt;phone = $phone;
        $this-&gt;message = $message;
    }

    //Funktion, welche ein Array zurückgibt in welchem die Daten die gespeichert werden sollen enthalten sind 
    function getDataToStore(){
        return array($this-&gt;fname, $this-&gt;lname, $this-&gt;street, $this-&gt;city, $this-&gt;place, $this-&gt;email, $this-&gt;phone);
    }
}
?&gt;
</code></pre>

<p>customer-class.php</p>

<p>So I've thought that I declared Customer twice, but I can't recognize anything. So I googled, but I can't find an answer. Can anybody help me?</p>