[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Nieuwe foto na een refresh
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Nieuwe foto na een refresh

Het echte opmaakwerk, alles vragen over HTMLen, CSSen en Javascripten.

Nieuwe foto na een refresh

Berichtdoor Jordi » 09 maart 2006 20:42

Me nieuwe lay-out!

Jordi
wmpr
 
Berichten: 28
Geregistreerd: 09 maart 2006 20:37

Re: Nieuwe foto na een refresh

Berichtdoor Anthony » 09 maart 2006 20:45

Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Re: Nieuwe foto na een refresh

Berichtdoor Jordi » 09 maart 2006 20:50

Me nieuwe lay-out!

Jordi
wmpr
 
Berichten: 28
Geregistreerd: 09 maart 2006 20:37

Re: Nieuwe foto na een refresh

Berichtdoor Anthony » 09 maart 2006 21:22

Je noemt je bestanden 1.jpg 2.jpg etc..


[code="php"]<?php $slide = rand(1,8); ?>[/code]
Hierbij is 8 het aantal afbeeldingen dat je hebt.

[code="html"]<img src="<?php echo $slide; ?>.jpg" alt="" />[/code]
Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Re: Nieuwe foto na een refresh

Berichtdoor Jordi » 09 maart 2006 21:44

Zou je misschien een kort voorbeeld kunnen maken voor als ik bijvoorbeeld de volgende foto's heb:

1.jpg
2.jpg
3.jpg


Alvast bedankt! Groetjes Jordi
Me nieuwe lay-out!

Jordi
wmpr
 
Berichten: 28
Geregistreerd: 09 maart 2006 20:37

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 09 maart 2006 22:57

Dan krijg je dus:

[code="html"]<html>
<body>
<?php $slide = rand(1,3); ?>
<img src="<?php echo $slide; ?>.jpg" alt="" />
</body>
</html>[/code]

Smile
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Nieuwe foto na een refresh

Berichtdoor julien » 09 maart 2006 23:39

Wat een opkikker, ik kon dat ook. Confused
Avatar gebruiker
julien
wmpr
 
Berichten: 2195
Geregistreerd: 28 nov 2003 16:21
Woonplaats: Kortrijk

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 10 maart 2006 01:39

Het is ook niet zo moeilijk ^^
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Nieuwe foto na een refresh

Berichtdoor Anonymous » 12 maart 2006 16:38

Anonymous
 

Re: Nieuwe foto na een refresh

Berichtdoor Dotcpu » 12 maart 2006 23:19

Dotcpu
wmpr
 
Berichten: 59
Geregistreerd: 11 nov 2005 18:49

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 13 maart 2006 08:33

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Nieuwe foto na een refresh

Berichtdoor Derk » 14 maart 2006 09:15

Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Nieuwe foto na een refresh

Berichtdoor Jordi » 15 maart 2006 16:45

Me nieuwe lay-out!

Jordi
wmpr
 
Berichten: 28
Geregistreerd: 09 maart 2006 20:37

Re: Nieuwe foto na een refresh

Berichtdoor Anthony » 15 maart 2006 16:53

Avatar gebruiker
Anthony
wmpr
 
Berichten: 2828
Geregistreerd: 07 aug 2004 14:05
Woonplaats: Brugge - België

Re: Nieuwe foto na een refresh

Berichtdoor Jordi » 15 maart 2006 16:55

Me nieuwe lay-out!

Jordi
wmpr
 
Berichten: 28
Geregistreerd: 09 maart 2006 20:37

Re: Nieuwe foto na een refresh

Berichtdoor Dotcpu » 16 maart 2006 21:23

Dotcpu
wmpr
 
Berichten: 59
Geregistreerd: 11 nov 2005 18:49

Re: Nieuwe foto na een refresh

Berichtdoor Derk » 16 maart 2006 22:34

Hoe wou jij Mysql random een regel laten selecteren?

Trouwens boeit het niet of MYSQL random meot berekenen of dat PHP dit doet.

Derk
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 16 maart 2006 22:37

Wat ik bedoel met overdreven, is dat het een stuk ingewikkelder wordt om op te zetten. Je moet dan weer helemaal een databaseconnectie maken (met bijbehorend username/wachtwoord), en een tabelstructuur maken. Vooral voor het doorgeven van scripts is dat redelijk onhandig, zeker als het ook met een paar kleine regeltjes extra ook zonder kan.
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Nieuwe foto na een refresh

Berichtdoor Dotcpu » 17 maart 2006 00:33

Dotcpu
wmpr
 
Berichten: 59
Geregistreerd: 11 nov 2005 18:49

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 17 maart 2006 08:48

Je zegt nu dat dit handiger is voor sites met veel pageviews, maar MySQL is een heel stuk zwaarder dan php. Grote sites zouden dus juist beter géén database kunnen gebruiken voor iets als dit.
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: Nieuwe foto na een refresh

Berichtdoor Derk » 17 maart 2006 22:52

dat klopt maar ik ben het nu wel met hem eens, dat áls je die database toch al gebruikt je beter op die random manier random kan selecteren als met de PHP functie rend
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Nieuwe foto na een refresh

Berichtdoor KillerSponge » 17 maart 2006 23:03

Nouja, tis toch weer extra databaseverkeer... Maar als er al met een database wordt gewerkt maakt het idd een stuk minder uit.
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05


Keer terug naar HTML, CSS, Javascript



cron