Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 20 van 286

Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als er een code mee wordt gegeven die bij iedereen anders is.. nee..
als die code wel bij iedereen hetzelfde is, dan kan het wel yummie
Maar als dat wel zo is... is dat denk ik om dit soort dingen te voorkomen
0
Berichten
10.409
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sanderc schreef:
Ik heb dus dit:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]

[COLOR= #0000BB]$user_controle[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Sander[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$pass_controle[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]pass[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]){[/COLOR]

    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]])){[/COLOR]
        [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);[/COLOR]
            
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$user_controle[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$pass_controle[/COLOR][COLOR= #007700]){[/COLOR]
                [COLOR= #0000BB]$_SESION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]loged_in[/COLOR][COLOR= #007700]] =[/COLOR] true[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$_SESION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$user[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 2; url=menu.php[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Je bent succesvol ingelogd, je wordt doorgestuurd![/COLOR][COLOR= #007700];
                
            }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 3; url=login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] De combinatie van de gebruikersnaam en het wachtwoord klopt niet![/COLOR][COLOR= #007700];
    }            
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 3; url=login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Een van de velden in niet ingevuld[/COLOR][COLOR= #007700];
        }        
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]()
    }[/COLOR]
?>


Maar hij geeft deze error:

Quote:
Parse error: syntax error, unexpected } in /home/fanhabbo/domains/thahab.nl/public_html/sander/login.php on line 30

Ik heb het aantal keer gecheckt met notepad en wat ik ook probeer he tlukt niet.

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/session_start"]session_start[/URL][COLOR= #007700]();[/COLOR]

[COLOR= #0000BB]$user_controle[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Sander[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$pass_controle[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]pass[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]){[/COLOR]

    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]])){[/COLOR]
        [COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]pass[/COLOR][COLOR= #007700]]);[/COLOR]
            
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$user[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$user_controle[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$pass[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$pass_controle[/COLOR][COLOR= #007700]){[/COLOR]
                [COLOR= #0000BB]$_SESION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]loged_in[/COLOR][COLOR= #007700]] =[/COLOR] true[COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$_SESION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]$user[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 2; url=menu.php[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Je bent succesvol ingelogd, je wordt doorgestuurd![/COLOR][COLOR= #007700];
                
            }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 3; url=login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] De combinatie van de gebruikersnaam en het wachtwoord klopt niet![/COLOR][COLOR= #007700];
    }            
    }[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Refresh: 3; url=login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Een van de velden in niet ingevuld[/COLOR][COLOR= #007700];
        }        
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: login_form.php[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700]();
    }[/COLOR]
?>
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
een ; vergeten ... cry
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aaah aah. Bedankt beide
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Wel met toestemming
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Voor je eigen account mag dat wel
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Voor je eigen account mag dat wel
Neen, Lennert wilt geen systemen die onnodig sessies aanmaken ofzo. Hij wilt gwn geen automatischt bezoekers en/of zo
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Voor je eigen account mag dat wel
Neen, Lennert wilt geen systemen die onnodig sessies aanmaken ofzo. Hij wilt gwn geen automatischt bezoekers en/of zo
Jurrie deed het wel en Lennard zei daar niks op
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Voor je eigen account mag dat wel
Neen, Lennert wilt geen systemen die onnodig sessies aanmaken ofzo. Hij wilt gwn geen automatischt bezoekers en/of zo
Jurrie deed het wel en Lennard zei daar niks op
Je moet toestemming vragen via ticket
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Maartenl schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Even dit: Je mag GEEN systemen maken die automatisch inloggen op One2xs!
Voor je eigen account mag dat wel
Neen, Lennert wilt geen systemen die onnodig sessies aanmaken ofzo. Hij wilt gwn geen automatischt bezoekers en/of zo
Jurrie deed het wel en Lennard zei daar niks op
Je moet toestemming vragen via ticket
Ik heb die , maximaal 1x per 15 minuten mag ik inloggen wink
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hoe moet dit:
}elseif($_POST[idee] > GROTER DAN ZOVEEL CHARARTERS ){
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
http://php.net/manual/en/function.strlen.php

[COLOR= #0000BB]<?php
$derp[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Een lange string[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$derp[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #FF8000]//Telang [/COLOR]

[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]{[/COLOR]

[COLOR= #FF8000]//De rest[/COLOR]

[COLOR= #007700]}[/COLOR]

?>


//Speciaal voor Lennard

[COLOR= #0000BB]<?php
$foo[/COLOR][COLOR= #007700]=[/COLOR] [COLOR= #DD0000]bar[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$foo[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #FF8000]//Telang [/COLOR]

[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]{[/COLOR]

[COLOR= #FF8000]//De rest[/COLOR]

[COLOR= #007700]}[/COLOR]

?>
Spoiler tonen
[COLOR= #0000BB]<?php
$lennard[/COLOR][COLOR= #007700]=[/COLOR] [COLOR= #DD0000]bar[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lennard[/COLOR][COLOR= #007700])>[/COLOR][COLOR= #0000BB]5[/COLOR][COLOR= #007700]){[/COLOR]

[COLOR= #FF8000]//Lennard is te klein[/COLOR]

[COLOR= #007700]}[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]{[/COLOR]

[COLOR= #FF8000]//Lennard is groot :D[/COLOR]

[COLOR= #007700]}[/COLOR]

?>
[/spoiler]
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jvdw schreef:
hoe moet dit:
}elseif($_POST[idee] > GROTER DAN ZOVEEL CHARARTERS ){
Zo dus:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]statement[COLOR= #007700]){[/COLOR]
    [COLOR= #FF8000]//Iets[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]idee[/COLOR][COLOR= #007700]])>[/COLOR][COLOR= #0000BB]25[/COLOR][COLOR= #007700]){[/COLOR] [COLOR= #FF8000]//25 vervangen door aantal karakters dat jij wilt[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000] Je idee is te groot[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [COLOR= #FF8000]//Iets[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


Correct my if im wrong
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren