krijg geen nieuws te zien.

Gestart doorAdmir14 reacties45 weergaven

15 berichten · pagina 1 van 1

Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb addnews.php van admin al klaar alleen nog de datum, maar dat doe ik later.
nieuws.php werkt niet echt zo goed, er zijn wat nieuws toegevoegd maar nieuws.php zegt van niet.

http://straat-power.nl/nieuws/nieuws.php

Er moet maximaal 5 nieuws komen op 1 page en later maak ik nog een page van meer nieuws ect. Het nieuws uit database halen wil maar nietcrycry kan iemand me helpen

GEFIXT
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hij werkt wel goed niet verwachtsmilewink
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hhaha, Je kan ook je get weghalen.
0
Jort

Lid

Berichten
524
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
-KNIP- Je had al opgelost yummie.
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Hhaha, Je kan ook je get weghalen.
bedanktsmile, maar wat ik, is dat de eerste 5 nieuws word getoont in nieuws.php, en niet in nieuws.php?nieuws=1
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar daarvoor moet je de Get weghalenbiggrin
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Maar daarvoor moet je de Get weghalenbiggrin
In rij 4?
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]config.php[/COLOR][COLOR= #007700];[/COLOR]
?>
[COLOR= #0000BB]<?php
$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]]);[/COLOR]

[COLOR= #0000BB]$nieuws_select[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"

    SELECT    
    *
    FROM
        nieuws
    ORDER BY
         id
    DESC
    LIMIT 5
"[/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/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nieuws_select[/COLOR][COLOR= #007700]))
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Deze nieuws bestaat niet.<br />"[/COLOR][COLOR= #007700];

}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<b>Nieuws-Overzicht<b><br />"[/COLOR][COLOR= #007700];[/COLOR]

    [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nieuws_select[/COLOR][COLOR= #007700]))
    {[/COLOR]
        
        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]] =[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]]);[/COLOR]

        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]] =[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]]);[/COLOR]

        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]]);[/COLOR]

        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]] =[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]]);[/COLOR]

        [COLOR= #0000BB]$titel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]];[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" || Added on : <i>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</i><br />"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" <br /> "[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]""[/COLOR][COLOR= #007700].[[/COLOR][COLOR= #DD0000]nieuws[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"<br />"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<hr>"[/COLOR][COLOR= #007700];
    }
}[/COLOR]
[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]();[/COLOR]
?>
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee hoor. xD
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Erik schreef:
Nee hoor. xD
nou effe niet ben images aan het maken zo dat je een plaatje kan zien die wat jij gaf doet het wel.
Zo images ook al gefixt.

0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij doet het nu wel
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Hij doet het nu wel
Yup, alleen nog addnews.php fixen dat de datum goed kom te staan.
0
Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hier kan een slotje op#
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