Hi.
I am new to php and Mysqli, I’ve written what I think is a basic script, but the Select command seems to be ignoring the first entry from my DB when I execute it. I’ve tried changing the * to a more precise string and it ignores the first from this list too.
Any ideas?
[COLOR=“Red”]<?php
include $_SERVER[‘DOCUMENT_ROOT’] . ‘\360feedback\includes\db.inc.php’;
include $_SERVER[‘DOCUMENT_ROOT’] . ‘\360feedback\includes\helpers.inc.php’;
include $_SERVER[‘DOCUMENT_ROOT’] . ‘\360feedback\includes\magicquotes.php’;
$result = mysqli_query($link, ‘SELECT * FROM user’);
$row = mysqli_fetch_array($result);
while ($row = mysqli_fetch_array($result))
{
$user = $row[‘user_name’];
}
?>
<p>Here are all the users in the database: </p>
<?php foreach($user as $users): ?>
<blockquote><p>
<?php echo htmlspecialchars ($users, ENT_QUOTES, ‘UTF-8’);?>
</p></blockquote>
<?php endforeach; ?>[/COLOR]