Welcome To Snipplr


Everyone's Recent Snippets Tagged post



0 1650 posted 16 years ago by gabbo
This code will loop through any posted variables and print the name of the field as well as the value of the field.
0 1705 posted 16 years ago by BFTrick
I use this to activate basic forms for clients. Just make sure your form input names are named appropriately. Any inputs such as phone or fax that are separated into different inputs should have the same name.
1 2207 posted 16 years ago by dmautz1
0 1418 posted 17 years ago by iloveitaly
This is just a simple function to get the variable without having to worry if its POST or GET, and even allows for a default value to be passed in case the variable was not found.
0 1746 posted 17 years ago by mondomondomxcom
There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. Outside a page template you'd have to add a global declaration for the $post...
2 2204 posted 17 years ago by cyberhobo
7 1984 posted 17 years ago by jamesming
Here is a small function that I use to update records in a database. It coincides with the insertFromPost function that I have posted earlier. The element names in the form need to have the same name as in the DB and the field names should all...
1 2071 posted 17 years ago by brownrl
I pieced together this code when I had to do this for a client: - show the first image attached to a post (based on sort order in gallery tab) in medium size - put all the other images attached to the post into an imageset so that when you click on...
1 2393 posted 17 years ago by zartgesotten
1 2217 posted 17 years ago by gfazioli
1 2180 posted 17 years ago by gfazioli
0 1985 posted 17 years ago by atr000
I see almost all GET, so this is handy to have around
0 1828 posted 17 years ago by atr000
fond this, and want to try it.
0 1837 posted 17 years ago by stavelin
1 1704 posted 17 years ago by davebowker
[quote]$_SERVER['HTTP_REFERRER']'s problem is that can be spoofed, but it's better than nothing if you really want that.[/quote]
1 2293 posted 17 years ago by luizlopes
1 2141 posted 17 years ago by Wiederkehr
This set of functions makes it quicker for me to code, might be useful to someone else =]
1 1824 posted 17 years ago by alli14404
1 2000 posted 17 years ago by stavelin
I'm working on a web app that requires me to track nearly 300 form fields. To make this easier, and to allow me to handle special cases, I needed to assign them to an internal array. The switch/case statement makes this a breeze.
1 1812 posted 17 years ago by mdrisser
This can be used as a general function to get the value stored in any of the possible input sources. use
0 1945 posted 18 years ago by luizlopes
This was taken out of a presentation by eZ systems on PHP Best Practices
0 1973 posted 18 years ago by luizlopes
0 1827 posted 18 years ago by udayrayala
2 2347 posted 18 years ago by evanwalsh
Created for my own purposes, thought I'd share though ;) copy paste at the top of your file and it does the magic :)
31 9191 posted 18 years ago by peteypablonz
2 2372 posted 19 years ago by lmcdougall