Page Hits Counter





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »
2
Date Submitted Tue. Apr. 10th, 2007 9:39 PM
Revision 1
Helper snowdonkey
Tags Form | PHP | Validate
Comments 3 comments
The following script is a single interface for pre-validating any HTML form. It lets you validate your form data the way you want, while handling the rudimentary tasks itself.

1) Change just one variable to make it work with $_GET or $_POST or $_REQUEST.

2) Name which elements are 'required' all at once in a hidden HTML text input.

3) Easily provide field descriptions in hidden HTML text inputs that you can use to print error statements.

4) Call a single function to print out error statements that you can easily style with CSS.

5) It automatically checks if fields marked 'required' have been filled out.

Most of the pre-validation code is from PHP 5: Unleashed by Sams Publishing. I found it extremely useful for a recent project. Sharing it here, I removed some unnecessary functions, and tried to simplify some points.

All the comments are my own; hopefully I provided more than enough explanation.
7
Date Submitted Wed. Apr. 4th, 2007 8:52 AM
Revision 1
Helper ushi
Tags Anti-Injection | Class | Database | mysql | PHP
Comments 6 comments
A simple MySQL class for use in PHP.
Feel free to suggest improvements.
12
Date Submitted Sat. Mar. 10th, 2007 7:13 PM
Revision 1
Helper albud
Tags CSS | PHP | processor
Comments 1 comments
Don't know if anyone will find this handly, but here's a CSS processor that I wrote that allows me to nest CSS Blocks, and various other things, making for an easier to maintain CSS file.

Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.

Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)

Please let me know what you think
13
Date Submitted Tue. Mar. 6th, 2007 2:36 PM
Revision 1
Beginner wlasson
Tags "image resize" | GD | images | PHP | Resize
Comments 1 comments
This is a simple function that resizes and image using the GD add on for PHP.
Just a disclaimer: I know its not perfect, but i figured i would post it because the only other one on here is way confusing to some new PHP developers. Hopefully this one will help you learn how to use GD, and then you can write a better one.
12
Date Submitted Thu. Mar. 1st, 2007 4:01 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 3 comments
With this function you can calculate the age of a person

Example:
echo "Age is: " . age("1984-07-05");

Result will be (23 Feb 2005) = "Age is: 20"
-6
Date Submitted Thu. Mar. 1st, 2007 3:56 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 5 comments
Get the count of records from DB
7
Date Submitted Thu. Mar. 1st, 2007 3:53 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 0 comments
Generate multi select box from data in db, then when submitted, each selection is written to a db table as it's own record, each tied together by a common record id.
14
Date Submitted Thu. Mar. 1st, 2007 3:48 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 5 comments
Display contents of a folder, see comments in code.
6
Date Submitted Thu. Mar. 1st, 2007 3:45 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 1 comments
Pull items from a mysql db table and display in the following format-
item1, item2, item3

In the example code, the query will return all items that have the color "red" specified in the db.
14
Date Submitted Thu. Mar. 1st, 2007 2:09 PM
Revision 1
Helper ushi
Tags ajax | Chat | JavaScript | PHP
Comments 3 comments
Simple chatting script to be placed on a corner of a website
Also a good example how to use ajax.
« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »