Jump to content

Code Error


fizzzgigg

Recommended Posts

Why doesn't this code work? I can't figure it out.

 

Database information:

DB: abelltx

table: homework

Fields in table: id, pid, uid, name, url, approved, comment, SubmissionTime

 

<?PHP
$link = mysql_connect('xxxxxx', 'xxxxx', 'xxxxxxx') or die(mysql_error());
mysql_select_db("abelltx", $link) or die(mysql_error());
$uid=abelltx

$query = "SELECT DISTINCT name FROM homework ORDER BY id ASC";
$result = query_db($query);

while ($myrow = mysql_fetch_array($result))
{
echo $myrow[name].", ";
}
?>

 

I get the following error:

"Parse error: syntax error, unexpected T_VARIABLE in D:\Hosting\5366560\html\test.php on line 6"

Link to comment
https://forums.phpfreaks.com/topic/222876-code-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.