Location: PHPKode > scripts > Sortable Elements > example.php
<?php

	$page_title = "PHP Class: Sortable Elements - Demo";
	include('../preheader.php');
	include('../header.php');

	# This file contains the code/functions to connect and query to/from your database, respectively.
	# As this methodology is different for all applications I did not include database handling functions
	# within my object. However, i do include a sample file 'preheader.php' which contains one possible
	# implementation
	include ('db.php');

	echo "<h1>Sortable Elements (Class Demo)</h1>";
	echo "<small><a href=\"http://seandempsey.com/classes/Sortable_Elements.php\">Back to walkthough</a></small><br />";

	#the code for the Sortable_Elements class
	include ('sorting.inc.php');

	#this one line of code is how you implement the class
	$sorting = new Sortable_Elements("Friend", "tblFriends", "pkFriendID", "fldName", "fldSort");





	include('../footer.php');

?>
Return current item: Sortable Elements