Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 198 van 286

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja, hij werkt!!

Ik ben lui, en heb geen zin om elke keer weer naar die website te gaan en in teloggen bloos
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Freestyle schreef:
Ja, hij werkt!!
Ik ben lui, en heb geen zin om elke keer weer naar die website te gaan en in teloggen bloos
Bookmark, user en pass opslaan en klaar.... In 3 sec, ben ik al in mijn website-backend.

Soms moet je het nog gemakkelijker maken met de middelen die je hebt.. yummie
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb nu:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Meerdere velden zijn niet ingevuld. Probeer opnieuw."[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Wachtwoord is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Email is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Voornaam is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Achternaam is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])) {[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruikersnaam is verplicht!"[/COLOR][COLOR= #007700];
}[/COLOR] ?>


(niet de volledige code is het, voor een voorbeeld).

Het werkt, maar ipv van dat wil ik dat alle forms die fout zijn veranderen naar een ander id, zodat de style anders is. bijv dat hij rood word.

Hoe doe ik dat?
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dus je wilt eigenlijk dat de foute forms rood kleuren?
Je kan ze opniew echoen met dan die style in die statement.
dat zou moeten werken want als je dan terug post, ceckt hik het opnieuw.
(ja ik heb code dus ik weet het)
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mmmm... Is dat echt de enigste manier of is het makkelijker?
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Mmmm... Is dat echt de enigste manier of is het makkelijker?
Jquery?
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Mmmm... Is dat echt de enigste manier of is het makkelijker?
Dat is mijn manier.
Het kan waarschijnlijk nog wel makkelijker met jQuery fzo?

toevoeging op 11 december 2012, 19:03:48:
Gamedealer zegt het net ^^
0
Berichten
5.737
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een plaatje in photoshop met doorzichtige achtergrond. Daar werkt het en is het opgeslagen als PNG en als GIF. Als ik het dan uploaden en weer open in photoshop is het niet meer doorzichtig weet iemand hoe dat kan?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Ik heb nu:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Meerdere velden zijn niet ingevuld. Probeer opnieuw."[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Wachtwoord is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Email is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Voornaam is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]])){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Achternaam is verplicht"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])) {[/COLOR]
       [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Gebruikersnaam is verplicht!"[/COLOR][COLOR= #007700];
}[/COLOR] ?>
(niet de volledige code is het, voor een voorbeeld).

Het werkt, maar ipv van dat wil ik dat alle forms die fout zijn veranderen naar een ander id, zodat de style anders is. bijv dat hij rood word.

Hoe doe ik dat?

empty is niet de beste manier om te controleren of iets is ingevuld. Zaken als true/false of null worden ook geweigerd....
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Gamedealer schreef:
Eerdere citaten tonen
Bjarnootjuh schreef:
Mmmm... Is dat echt de enigste manier of is het makkelijker?
Jquery?
Hoe? Met een refresh of?

@aarclay, die 3 hoeven ook niet yummie
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Beste is om met:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])  {[/COLOR] 
?>


een dergelijke controle te doen.
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Beste is om met:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])  {[/COLOR] 
?>
een dergelijke controle te doen.

Dus:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/trim"]trim[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]username[/COLOR][COLOR= #007700]])==[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])  {[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Error :o[/COLOR] 
?>
0
Lennard

Lid · Topicstarter

Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
En vergeet isset niet he, indien van toepassing.
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik wil een soort site kritiek site maken.
Dus waar mensen kritiek van een team krijgen op hun site en dan een punt.

Vinden jullie dat een goed idee?
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Iemand tips hoe ik het beste een site kan opbouwen?
- Framework
- Gewoon PHP
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