Waarom laat dit script de text in de var $text niet zien?

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Stefan

stefan

10/10/2004 21:17:00
Quote Anchor link
Waarom laat dit script de text in de var $text niet zien?

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
    if ($_SESSION['Firstname'] && $_SESSION['Username'] && $_SESSION['Password']) {
        $text = "
                    <b>
                        Ingelogd
                    </b>
                    Je bent al ingelogd!
        "
;
    }

        
    else if (!$_SESSION['Firstname'] && $_SESSION['Username'] && $_SESSION['Password']) {
        $mysql_username = "scriptznet_data";
        $mysql_password = "scriptz";
        $mysql_host = "hollosite.com";
        $mysql_database = "scriptznet_data";
        
        if (!@mysql_select_db($mysql_database, @mysql_connect($mysql_host, $mysql_username, $mysql_password))) {
            $text = "
                    <b>
                        Fout
                    </b>
                    <br>
                    Geen database connectie!"
;  
        }

    
        else {
            $text = "
                    <b>
                        Log-in
                    </b>
                    <br>
                    <form action=\"$PHP_SEL\" method=\"post\">
                        Gebruikersnaam
                        <br>
                        <input type=\"text\" name=\"Username\">
                        <br>
                        <br>
                        Wachtwoord
                        <br>
                        <input type=\"password\" name=\"Password\">
                        <br>
                        <br>
                        <br>
                        <input type=\"submit\" name=\"Submit\" value=\"log-in\">
                        <br>
                        <input type=\"reset\" name=\"Reset\" value=\"wissen\">
                    </form>
            "
;
                
            if ($_POST['Submit']) {
                if ($_POST['Username'] && $_POST['Password']) {
                    $select_members_details = "SELECT * FROM members WHERE Username = '$_POST[Username]' AND Password = '$_POST[Password]'";
                    $results_member_details = mysql_query($select_member_details);
                    
                    if ($results_member_details == 1) {
                        while ($selected_member_details = mysql_fetch_array($results_member_details)) {
                            $text = "
                    <b>
                        Ingelogd
                    </b>
                    <br>
                    Je bent ingelogd, "
.$selected_member_details['Firstname'].".
                            "
;
                    
                        }

                        
                        $_SESSION['Fistname'] = $selected_member_details['Firstname'];
                        $_SESSION['Username'] = $_POST['Username'];
                        $_SESSION['Password'] = md5($_POST['Password']);
                    }

                    
                    else {
                        $text = "
                    <b>
                        Fout
                    </b>
                    <br>
                    Het wachtwoord en/of de gebruikersnaam zijn ongeldig!
                        "
;
                    }
                }

                
                else {
                    $text = "
                    <b>
                        Fout
                    </b>
                    <br>
                    Je hebt iets niet ingevuld!
                    "
;
                }
            }
        }
    }

    
        echo "".$text."";
?>
 
PHP hulp

PHP hulp

16/01/2025 18:39:22
 

10/10/2004 21:25:00
Quote Anchor link
(!$_SESSION['Firstname'] && $_SESSION['Username'] && $_SESSION['Password'])

Firstname moet leeg zijn en in de andere session-vars moet iets staan?
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.