admaster
11-30-2006, 12:58 AM
I'm a php newbie, so please do bear with me. I want to have a php file that lists all of hte contents on one of the rows on a sql table.
I have a table with two fields, username, and password.
I want a page that displays all the stuf funder username.
I have this:
<?php
$sql = "SELECT username FROM beta";
$query = mysql_query($sql, $var);
while($row = mysql_fetch_row($query)) {
echo $row['0'].'<br />';
}
?>
It doesn't work. Can someone provide me with a better code, that actually works.
Thanks.
I posted this on the othe rforum too so I could get an answer.
I have a table with two fields, username, and password.
I want a page that displays all the stuf funder username.
I have this:
<?php
$sql = "SELECT username FROM beta";
$query = mysql_query($sql, $var);
while($row = mysql_fetch_row($query)) {
echo $row['0'].'<br />';
}
?>
It doesn't work. Can someone provide me with a better code, that actually works.
Thanks.
I posted this on the othe rforum too so I could get an answer.