note 16089 added to function.echo

From: Date: Tue, 16 Oct 2001 08:35:56 +0000
Subject: note 16089 added to function.echo
Groups: php.notes 
Request: Send a blank email to php-notes+get-18972@lists.php.net to get a copy of this message
PHP & MySQL : Placing a Range Maker for submitting to another page ( Part 2 ). =================================================================== Created : Séan J. Lathey Date : 16/10/2001 © Copyright 2001 ******************************************************************************* * Place this in the COMMON file or the receiving page * ******************************************************************************* function getRange( $keyword ) { $getRange = explode ("-", $keyword); return $getRange; } ******************************************************************************* * Place this in the receiving page * ******************************************************************************* // Alter the HEADER accordingly, like this one perhaps commonHeader2("Serial Numbers Register : &#171; Show records for $NumRange &#187;."); // This finds the start and end ranges from the pass value for $NumRange $TheNumbers=getRange($NumRange); $StartRange=$TheNumbers[0]; $EndRange=$TheNumbers[1]; // Add this to the MySQL SELECT statement $q.="WHERE"; if($NumRange=="ALL") { $q.=" $UseTable.$UseField > $BaseNum "; } else { $q.=" $UseTable.$UseField >= $StartRange "; $q.="AND"; $q.=" $UseTable.$UseField <= $EndRange "; } // If allowing to change the order on the receiving page, then add to the form action statement &NumRange=$NumRange&UseTable=$UseTable&UseField=$UseField&BaseNum=$BaseNum -- http://www.php.net/manual/en/function.echo.php http://master.php.net/manage/user-notes.php?action=edit+16089 http://master.php.net/manage/user-notes.php?action=delete+16089 http://master.php.net/manage/user-notes.php?action=reject+16089

« previous php.notes (#18972) next »