Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 140 141 142 143 144 ... 147
Inserts the values of an array into a table. Also supports specifying if a specific field needs to be encoded using PASSWORD() Parameters: Table: Name of table to insert into Data: array of $field->$value of new data Password Field: Which field i...
3 1379 posted 16 years ago by depmed
get the image size and reduces it dynamically
3 770 posted 16 years ago by valcartei
Convert 12hs format to 24hs format. In example: 10:00:00 a.m. return timestamp for 22:00. Or use: strtotime('1970-01-01 '.$hora);
1 615 posted 16 years ago by nicolaspar
1 626 posted 16 years ago by nicolaspar
to use apostrophs in the field values i.e. st john's
0 471 posted 16 years ago by valcartei
great to validate and process a form in the same page
5 1644 posted 16 years ago by valcartei
Was fiddling around at work one day thought this might be useful.
9 2985 posted 16 years ago by djdykes
Put classes around your bodyy, to allow different colors for seperate pages and areas on your site. IT will simply add a css-safe version of the first argument in an url. Say the url is /about_us/our_company the class will be body.about-us Require...
2 641 posted 16 years ago by berkes
have dt and dd inline is done automatically in Firefox, but screws up in IE7. So we need additional css rules, which have to be applied only if IE is used.
0 852 posted 16 years ago by valcartei
0 521 posted 16 years ago by asteinhaus
The original code was meant to be used with register_globals=on. If you cannot or don't want to turn that on, then I have modified the code to work with register_globals=off.
4 706 posted 16 years ago by Jaymoon
a function to check the validity of the postcode according to UK rules
0 2923 posted 16 years ago by valcartei
echo validarFecha( '1-1-1998', 0 ) ? 'ok' : 'ko' ; #ok echo validarFecha( '1-1-1998' ) ? 'ok' : 'ko' ; #ko echo validarFecha( '1980/05/06' ) ? 'ok' : 'ko' ; #ok echo validarFecha( '1700-5-1' ) ? 'ok' : 'ko' ; #ok
0 651 posted 16 years ago by nicolaspar
echo ( browser_detection( 'number' ) .''. browser_detection( 'browser' ) .''. browser_detection( 'os' ) .''. browser_detection( 'os_number' ) ); Outputs (browser version, browser, os, os number): 1.5 moz nt 5.1 if ( ( browser_de...
2 929 posted 16 years ago by llbbl
1 866 posted 16 years ago by llbbl
A form alter to gove Drupal a separate teaser field.
3 660 posted 16 years ago by berkes
good for parsing a message for urls so you can process them for character length when displayed on screen
3 731 posted 16 years ago by hdotnet
1 415 posted 16 years ago by methnen
1 822 posted 16 years ago by nicolaspar
Don't do it this way. This was written so long ago.
90 6012 posted 16 years ago by llbbl
This class operates a range of mysql functions base on arrays. Example: Name: Description:
22 4556 posted 16 years ago by emuen
4 949 posted 16 years ago by llbbl
1 ... 140 141 142 143 144 ... 147