Table help

Gestart doorJesper44 reacties112 weergaven

45 berichten · pagina 1 van 3

Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe maak ik een tabel van:

Hier plaatje 1 | en dan komt hier het andere plaatje

| = border

Plz help
Heb het snel nodig

toevoeging op 20 februari 2012, 121206:
Het werkt met mysql he
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Geen tabel voor nodig. Onnodig gepruts....

Een list-element in HTML (ul, li) voldoet hiervoor, met een float:left op je li, kan je al een hoop bereiken. Dan rest het alleen nog even te spelen met je border. thumbsup
Dat het met MySQL werkt is een bijzaak. Wat je wilt valt onder design, dit zou je gewoon in/om je PHP-code kunnen verwerken.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoebedoel je voorbeeldje?

Dit is mijn script:

[COLOR= #0000BB]<?php
$query3[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM fotos 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/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result3[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query3[/COLOR][COLOR= #007700]))[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]link[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]"><img src="[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]link[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]" width="200" height="200" /></a><br />Beschijving:
[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschijving[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]<br />
Door: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]<br />
Op :[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result3[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]<br /> <br />
[/COLOR][COLOR= #007700];[/COLOR]
?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Een voorbeeldje...
HTML:

<ul id="menu">
 <li>Test</li>
 <li>Melp</li>
 <li>Spef!</li>
 <li>Lolz!</li>
</ul>


CSS:

#menu ul {
width:800px;
}

#menu ul li {
float:left;
display:block;
width: 60px;
}


En je weet dat die die() op het kerkhof der PHP-functies thuishoort hé?
Duidelijke naamgeving van variabelen kan ik ook aanraden. $query3 is zo nietszeggend, en kan tot verwarring leiden.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oh, shit ik krijg oorpijn nopompom
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
clown
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe maak je een tumbnail van een foto?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Verkleinen met PixResize, of PhotoShop. Zelf Google kan je erbij helpen:
klik hier
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb nu een tabel agenda, en er staat een datetime in
voor admin paneel
maar nu wil ik zon icoontje dat ik de datum kan pakken van vandaag, is dit mogelijk?
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja, bedankt

[COLOR= #0000BB]<?php

$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM blog ORDER BY id DESC LIMIT 10"[/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]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]))[/COLOR]



[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<h2>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</h2><br />
<i>Door: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] Op: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] Categorie: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]categorie[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</i><br />
<br />
[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]
<a href="?p=blogbekijken&id=[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]">Lees meer</a>

[/COLOR][COLOR= #007700];[/COLOR]
?>


Hoe zorg ik er voor dat hij naast de categorie de aantal van reacties optelt en er neer zet
Als ik mysql_num_rows doe, is de hele pagina raar
Misschien doe ik iets vekeerd ofzo maar geef aub even een voorbeeldje, kan ik wat meer mee
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Quote:
Als ik mysql_num_rows doe, is de hele pagina raar

Verte...

Wees a.u.b. zo duidelijk mogelijk over wat er verkeerd gaat, we hebben immers geen glazen bol.
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php

$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM blog ORDER BY id DESC LIMIT 10"[/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]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]))[/COLOR]

[COLOR= #0000BB]$resulta[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM blogreactions"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$num_rows[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$resulta[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<h2>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</h2><br />
<i>Door: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] Op: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] Categorie: [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]categorie[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</i><br />
<br />
[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]
<a href="?p=blogbekijken&id=[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$result[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR][COLOR= #DD0000]">Lees meer</a> $num_rows

[/COLOR][COLOR= #007700];[/COLOR]
?>


Als ik dit doe: /
Dan geeft hij een witte pagina..
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Haal je niet enkel de berichten op van die blogpost ?
PHP moet ook niet in HTML
0
Jesper

Lid · Topicstarter

Berichten
3.532
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
????
Ik wil dat hij de berichten ophaalt en er bij zet hoeveel reacties er gepost zijn..
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