Welcome To Snipplr


Everyone's Recent Snippets Tagged php



1 ... 32 33 34 35 36 ... 64
All code should ideally go into your theme\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s template.php file. I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'ve used the default Garland theme here as an example.
0 1649 posted 15 years ago by hiddentao
0 1444 posted 15 years ago by robksawyer
A simple one liner that updates the Auth component's session variables when the user model is updated
0 1285 posted 15 years ago by robksawyer
Allows you to still view PHP parse errors, even if you don't have write access to your php.ini file. Since PHP pages are parsed before being executed, parse errors won't show up even if you turn on display_errors in the page you are checking.
2 1527 posted 15 years ago by Moridin
0 1680 posted 15 years ago by alexandrepayet
It's fun to read what I wrote ages ago. An ORM that was heavily influenced (or should I say misguided) by CakePHP, lol.
2 1754 posted 15 years ago by fredwu
3 1829 posted 15 years ago by StephFR
Here's a little trick I started using when working with XAMPP for localhost and keeping things in tune with the live configuration variables such as username and passwords to mysql (or whatever you're writing for). The example below figures your w...
1 1429 posted 15 years ago by jackkeller
0 1207 posted 15 years ago by juannaviap
1 1297 posted 15 years ago by kaartz
1 1814 posted 15 years ago by yeremiloli
Paste the code in a file named style.php. Don’t forget to include your css files . Once done, open your HTML document and import style.php as you’ll import a css stylesheet.
3 1818 posted 15 years ago by math89
This is what I wanted:\r\nI had a structure like this:\r\n-Artist\r\n --Peter Miller\r\n ---Pictures\r\n ---Press\r\n ---Videos\r\n\r\nand wanted to have the sub-sub-Menu when located on the \"Peter Miller\"-Page. \r\nSo that on \"Peter...
0 1582 posted 15 years ago by zartgesotten
A simple wrapper class for MySql around PDO. Also an example on how to use this wrapper for SQLite.
1 1391 posted 15 years ago by Knarf
This is the PHP code to debug any variable ..
1 1742 posted 15 years ago by xkeshav
0 1603 posted 15 years ago by DesignByWilliam
If you want to get all the TV from a specific document
1 2264 posted 15 years ago by thiswayup
0 1407 posted 15 years ago by lolindirfaelivrin
Working on creating a 'days ago' script. I know some already exist, but I just want to know how to do it myself. I'm also incorporating leap year functionality and some utility functions that could be used on other projects.
2 3007 posted 15 years ago by alvincrespo
Originally written by Jason Lengstorf, rewritten by Drew Douglass, packaged into the EnnuiCMS (link above), can be used as standalone class. Be sure to change or define your constants for PAGE_OBJ_WIDTH and PAGE_OBJ_HEIGHT when using the YouTube m...
1 1642 posted 15 years ago by DrewDouglass
Substitute new_ placeholder in the second line with your new prefix. Run it: http://www.yoursite.com/rename.php and wait until it responds with an OK, usually after a couple of seconds. Delete the rename.php script. Edit the configuration.php file...
0 2829 posted 15 years ago by beneberle
I\'ve added an additional case to handle videos linked from a user\'s channel.
2 2814 posted 15 years ago by Jamie
This code adds the specified library to the header in WordPress unless you are in the admin section.
2 1645 posted 15 years ago by jonkemp
1 1075 posted 15 years ago by neillh
2 1454 posted 15 years ago by stuntsnippets
When retrieving table rows with PHP and prepared statements, you must use a method called bind_result() and pass in a variable name for each column that is being returned from the database. For example, if you are selecting three columns (say, id, ti...
3 2379 posted 15 years ago by Nettuts
1 ... 32 33 34 35 36 ... 64