tijd probleem

Gestart doorKrm14 reacties56 weergaven

15 berichten · pagina 1 van 1

Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hoe kan ik dit in nl veranderen

$date = date ( "l H:i" );

als ik deze gebruik komt er
Thursday 09:54

ik wil dat er donderdag staat
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Die weet ik biggrinsetlocale() gebruiken

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/setlocale"]setlocale[/URL][COLOR= #007700]([/COLOR]LC_ALL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]nl_NL[/COLOR][COLOR= #007700]);[/COLOR]
?>
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
er komt geen verschil in
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
of je moet de maanden in een array zetten
en dan moet je die laten selecteren aan de hand van de dag nummer
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$date[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]"l H:i"[/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/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO www (actief, www) VALUES (1, $_POST[www])"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/print"]print[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Succesvol toegevoegd!"[/COLOR][COLOR= #007700];
    }[/COLOR]
    ?>


maar hoe kan ik het hier laten invoegen in me database
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
in welk veld?
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
veld tijd
0
Berichten
5.795
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?
$date[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL] [COLOR= #007700]([/COLOR] [COLOR= #DD0000]"l H:i"[/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/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO www (actief, www, tijd) VALUES (1, $_POST[www], $date)"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/print"]print[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Succesvol toegevoegd!"[/COLOR][COLOR= #007700];
    }[/COLOR]
    ?>
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zo had ik het ook maar het blijft engels
het moet nl zijn
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/setlocale"]setlocale[/URL][COLOR= #007700]([/COLOR]LC_ALL[COLOR= #007700],[/COLOR] [COLOR= #DD0000]nl_NL[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]nld[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]dutch[/COLOR][COLOR= #007700]);[/COLOR]
?>


Probeer dat isbiggrin?
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
waar moet ik die plaatsen bij het invoegen of het uitlezen
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
bovenaan in je config.php onder session_start();
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
werkt alsnog niet

en zo haal ik hem op

[COLOR= #0000BB]<?php

$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM www ORDER BY id DESC LIMIT 1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$object[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$object->tijd<br /><i>$object->www</i><br /><br />"[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Dit helpt niet maar het is wel beter:

[COLOR= #0000BB]<?php
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM www ORDER BY id DESC LIMIT 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR][COLOR= #FF8000]// waarom 2 delen als het in 1 kan?[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$object[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR] [COLOR= #FF8000]// assoc is sneller[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$object[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<br /><i>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$object[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]www[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</i><br /><br />[/COLOR][COLOR= #007700];[/COLOR][COLOR= #FF8000]// met een tab en vergeet de echo niet efe af te sluiten als je iets wilt weergeven[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Krm

Lid · Topicstarter

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dat verbeteren dat boeide me niet echt maar wel bedankt maar die dag moet echt in het nederlands

ik heb het tijdelij kzo opgelost
met javascript weergeeft hij de dag naam van welke dag we zijn
en omdat ik tog elke dag minstens 5 x ga updaten kan het wel tijdelijk zo

kerem-cakir.nl
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