Zend - The PHP Company




Code Gallery: RLYNCH


Cascading Menu  

Type: code fragment
Added by: RLYNCH
Entered: 22/02/2000
Last modified: 08/12/1999
Rating: **** (62 votes)
Views: 102139
A very stripped-down sample of a cascading menu.


Changing Two FRAMEs At Once  

Type: code fragment
Added by: rlynch
Entered: 13/05/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 10288
Example of changing two frames at once.


Comment Form  

Type: code fragment
Added by: rlynch
Entered: 16/05/2000
Last modified: 01/11/2007
Rating: *** (4 votes)
Views: 10789
Simple example of how to add comments to your pages not unlike the user's annotated manual at http://www.php.net/ You may want to use URLs as a key instead of productid to be even more like PHP's annotation facility.


Delete  

Type: code fragment
Added by: RLYNCH
Entered: 13/02/2000
Last modified: 08/12/1999
Rating: *** (10 votes)
Views: 13904
A very brief sample of how to delete items from a database.


DumpArray  

Type: application
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 7113
Dumps out an array suitable for re-creating using eval()


Form Mail  

Type: application
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 07/12/2009
Rating: **** (21 votes)
Views: 46697
Sends a FORM results via email


Global Replace  

Type: application
Added by: RLYNCH
Entered: 13/02/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 6761
A global search and replace using PHP. You'll need to specify several parameters as GET/POST parameters: oldword=[text to replace] newword=[new text] rootpath=[path to dir containing files to alter] Note also that PHP must have read/write access to the files to alter them.


Global Search And Replace  

Type: code fragment
Added by: RLYNCH
Entered: 02/02/2000
Last modified: 08/12/1999
Rating: *** (3 votes)
Views: 8958
Globally Searches and Replaces text in files throughout a directory.


Minimal File Upload  

Type: application
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 03/12/2008
Rating: **** (7 votes)
Views: 19120
Minimal File Upload to demonstrate it. See File Uploading entry for a fuller example.


Multiple MySQL  

Type: code fragment
Added by: RLYNCH
Entered: 22/02/2000
Last modified: 08/12/1999
Rating: *** (9 votes)
Views: 11321
Connecting to two different databases in one script using MySQL


Previous MySQL Database  

Type: code fragment
Added by: RLYNCH
Entered: 22/02/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 4954
Since mysql_select_db and its ilk does not provide a way to determine the previously selected database for a generalized approach to database selection, here's a "roll your own" that keeps a record of the previous database selection.


Required  

Type: code fragment
Added by: RLYNCH
Entered: 13/02/2000
Last modified: 08/12/1999
Rating: *** (9 votes)
Views: 14631
A rudimentary sample of how to require elements of a form to be filled out.


Time-Based Contest  

Type: application
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 7485
Run a contest that ends at a specific date/time


versioncmp  

Type: code fragment
Added by: RLYNCH
Entered: 21/06/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 4909
//Returns 0 if two versions are equal. //Returns -1 if $version1 is less than $version2 //Returns 1 if $version1 is greater than $version2 //See strcmp //NOTE: Does not handle "Beta", "RC", or any other non-numeric version //designation.


Whereis  

Type: code fragment
Added by: RLYNCH
Entered: 27/01/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 7581
Will attempt to locate a given OS program.




Search