Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 2
Joined: Thu Jan 23, 2014 8:01 am


Postby qwerty123 » Thu Jan 23, 2014 8:05 am

Code: Select all

$connect = mysqli_connect('localhost', $u_name, $p_word, $db_name);
$query =  "SELECT * FROM `Dealers` LIMIT 0, 5 ";
$result = mysqli_query ($connect, $query);
$row = mysqli_fetch_assoc($result);

echo 'here are the results: '  ;
   while ($row){
   echo $row['name'];

im new to php. that being said, this code only return the first row and repeats it over and over again. i dont know what i am doing wrong. i want it to return every name in the table

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 5 guests