Return to Snippet

Revision: 44931
at April 20, 2011 23:37 by BrianHanly


Initial Code
<?php
include ('connect.php');

$fid = $_GET['id'];

$query = "SELECT Distinct enrollment.className, users.name FROM enrollment INNER JOIN users ON enrollment.fid = users.fid INNER JOIN class ON enrollment.className = class.className where users.fid ='".$fid."'";

//$query = "SELECT  FROM enrollment w fid ='".$fid."'";
$title = 0;
$result = mysql_query($query)or die(mysql_error());

while($row = mysql_fetch_array($result) or die(mysql_error()))
{


if($title == 0)
{
	echo "<h1>".$row['name']."'s Classes!</h1>";
	echo "<ol>";
	$title++;
} 

	echo "<li>".$row['className']."</li>";

}
echo "</ol>";

?>

Initial URL

                                

Initial Description

                                

Initial Title
Classes With Friends (myclasses.php)

Initial Tags
facebook

Initial Language
PHP