logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
DavidWarden38  
#1 Posted : Friday, July 27, 2018 4:25:00 AM(UTC)
DavidWarden38

Rank: Newbie

Groups: Registered
Joined: 7/27/2018(UTC)
Posts: 0

I am trying to get information from my MySQL database into HTML table but it seems not to work and I have no clue where's the mistake. Could someone check the code and tell me what I am doing wrong?

<?php

require('db.php');

$sql = mysql_query("SELECT * FROM tablename ORDER BY id ASC");

$id = 'ID';
$fullname = 'fullname';
$password = 'password';
$adres = 'adres';
$telephone = 'telephone';
$registration = 'registration';
while ($rows = mysql_fetch_assoc($sql)){

}
?>
<table width="100%" border="1">
<thead><tr>
<td>Klantennummer</td>
<td>Volledige naam</td>
<td>Email</td>
<td>Adres</td>
<td>Klant bewerken</td>
<td>Klant verwijderen</td>
</tr>
</thead>
<tbody>
<?php
while( $rows = mysql_fetch_assoc($sql) ){
echo
"<tr>
<td>{$rows\['id'\]}</td>
<td>{$rows\['fullname'\]}</td>
<td>{$rows\['email'\]}</td>
<td>{$rows\['adres'\]}</td>

</tr>\n";
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.