me script werkt niet

Gestart doorOne2xs13 reacties57 weergaven

14 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En wat doet hij fout?
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
Tom

Lid

Berichten
3.868
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
Hij geeft niks weer.

Dan zou je misschien de php mysql database querys is moeten nakijken.
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
Jort

Lid

Berichten
524
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Probeer eens:

[COLOR= #0000BB]<?php
    $sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id,title,bericht FROM nieuws ORDER BY id ASC "[/COLOR][COLOR= #007700]);[/COLOR]
    
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]))
    {[/COLOR]
    [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000].htmlentities($row["id"], ENT_QUOTES).[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$title[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000].htmlentities($row["title"], ENT_QUOTES).[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$short[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000].htmlentities($row["bericht"], ENT_QUOTES).[/COLOR][COLOR= #007700];[/COLOR]

    [COLOR= #0000BB]$img[/COLOR] [COLOR= #007700]=[/COLOR][COLOR= #DD0000]test[/COLOR][COLOR= #007700];
}}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
    [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]#[/COLOR][COLOR= #007700];[/COLOR]
    
    [COLOR= #0000BB]$title[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Er zijn nog geen nieuwsberichten[/COLOR][COLOR= #007700];[/COLOR]
    
    [COLOR= #0000BB]$short[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]#[/COLOR][COLOR= #007700];[/COLOR]
    
    [COLOR= #0000BB]$img[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]test[/COLOR][COLOR= #007700];
}[/COLOR]
?>


(in fade.php)

Ohja, nu geeft ie ook een bericht weer als er geen is. emo
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
maak van regel 2 eens:

$sql = mysql_query("SELECT id, title, bericht, image FROM nieuws ORDER BY id ASC") OR die(mysql_error());
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
je moet de config nog includen emo
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
hier kan slotje op
alles is nu goed
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