Generate a dropdown with months in a year





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 Wed. Nov. 7th, 2007 2:45 PM
Revision 1
Helper Idlemind
Tags PHP
Comments 2 comments
If it's a .php page, you can simply include this file where you want a hit counter to appear.

One file - text output. Very simple, very easy. Based off the filename of the page (creates a pagename.counter file to hold the count).
(No use for it myself - made it for a friend).
5
Date Submitted Mon. Oct. 22nd, 2007 8:43 AM
Revision 1
Beginner richard123
Tags JavaScript | PHP | resolution
Comments 3 comments
This detects screen resolution using javascript and makes it available to php by way of cookies.
2
Date Submitted Thu. Oct. 18th, 2007 8:32 AM
Revision 1
Beginner Tr0y
Tags PHP
Comments 0 comments
Use this to print alternating values from an array.

It cycles through a series of values based on an iteration number.

For example, you could use this for alternating background colors.
5
Date Submitted Wed. Oct. 3rd, 2007 8:23 PM
Revision 1
Helper explode
Tags mysql | PHP | Time | tracking
Comments 1 comments
Well after searching the internet for something similar to this, I didn't come up with anything...so I made my own! This simple script will track your members' time spent on your website. Please feel free to give comments/suggestions/feedback.
5
Date Submitted Thu. Sep. 27th, 2007 8:02 AM
Revision 1
Scripter Fordiman
Tags JavaScript | PHP | Prototype | serialize
Comments 2 comments
This is the final version of my Javascript serializer targetted at PHP.

The point:
Objects are most easily passed over the network as serialized strings. Between serialization and unserialization, serialization is by far the easier of the two. Since object passing can sometimes be a process-hungry thing, we want to do things as quickly as possible.

My solution is to always do the hard part in compiled code, while doing the easy part in script. That is, whichever way you're passing an Object, you want to pass it in a natively decoded format for the target.

Since I work mostly in PHP, this meant writing a module that would be able to generate a string that can be decoded with PHP's unserialize() function into a PHP Associative Array (or other applicable type).

Notes:
This lib REQUIRES the Prototype lib. You can hack prototype out of it, of course (by replacing the references to Object.extend() with explicit assignments), but I can't imagine why you'd want to bother; it's used mostly with Ajax.Request anyway.

Previous versions of this code would add the .toPHP() member to the Object prototype. After trying to enumerate things, I found that this is a REALLY bad thing to do, as toPHP springs up where it's not wanted in ALL objects. As a result, I've opted to go the Prototype route and apply it as a member of the Object object.

Please note that if you pass a serialized string to PHP via GET or POST, you'll need to stripslashes() before unserialization.



Javascript sample of use:

var myObject = {
name:'value',
test:['Array','of','strings'],
bool:false,
timestamp: new Date(),
float: 3.1415926539,
number: 42,
func: function () {
alert('Member functions are always omitted from serialization');
}
}
alert(Object.toPHP(myObject));

Output:
a:7:{s:4:"name";s:5:"value";s:4:"test";a:3:{i:0;s:5:"Array";i:1;s:2:"of";i:2;s:7:"strings";}s:4:"bool";b:0;s:9:"timestamp";i:1190897619824;s:5:"float";d:3.1415926539;s:6:"number";i:42;s:4:"func";null}


Sample of subsequent unserialization in PHP (passed via POST as 'myobject')

$myObject=unserialize(stripslashes($_POST['myobject']));
var_dump($myObject);

Output:
array(7) {
["name"]=>
string(5) "value"
["test"]=>
array(3) {
[0]=>
string(5) "Array"
[1]=>
string(2) "of"
[2]=>
string(7) "strings"
}
["bool"]=>
bool(false)
["timestamp"]=>
int(1192296601)
["float"]=>
float(3.1415926539)
["number"]=>
int(42)
["func"]=>
NULL
}
5
Date Submitted Tue. Sep. 4th, 2007 11:34 PM
Revision 1
Helper explode
Tags excel | mysql | PHP | query
Comments 0 comments
This is a cool function that lets you save MySQL query data to an Excel spreadsheet. This is good for taking a backup or if you want to change a lot of information fast, then re-upload it.

I will use the config.php and class.mysql.php files from MySQL DB Class with Extras, so please look at those also.
5
Date Submitted Tue. Sep. 4th, 2007 11:27 PM
Revision 1
Helper explode
Tags mysql | PHP | query
Comments 2 comments
This is a little function that you can use to print out results of a query. It will dynamicly generate the table for you (like phpMyAdmin). This is a nice little checker that is fast. It beats logging into phpMyAdmin and typing in your query there.

I will use the config.php and class.mysql.php files from MySQL DB Class with Extras, so please look at those also.
5
Date Submitted Tue. Sep. 4th, 2007 11:13 PM
Revision 1
Helper explode
Tags "credit card" | authorize.net | Class | PHP
Comments 0 comments
This is an authorize.net credit card processing class. Required elements are:
- Authorize.net account (live and/or sandbox)
- PHP w/ CURL installed
- SSL certificate installed on server
- My Simple Error Class

And use my Easy Credit Card Class as a pre-processor to this class.

For more information on authorize.net just go to their website and download their developers information.
5
Date Submitted Tue. Sep. 4th, 2007 10:24 PM
Revision 1
Helper explode
Tags Email | PHP | regex | Validate
Comments 1 comments
This is a simple function to check if an email is valid or not.
1
Date Submitted Tue. Sep. 4th, 2007 7:28 PM
Revision 1
Helper explode
Tags PHP | Random
Comments 1 comments
This little function does great for passwords, usernames, files, and anything else you need a random string for.
« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »