PHP Tutorials

Rails 3 – PHP Style Global Variables, $_SESSION, $_GET, $_POST in the models, and everywhere.

PHP Globals in Rails 3 So, as part of my slow descent into hell for even showing this stuff, I thought I would make a quick and dirty post about getting PHP like globals into your models in Rails. I wrote a longer article about globals in the model in rails which you can check [...]

Posted in: Computer Science, PHP Tutorials, PHP/MySQL, Ruby on Rails, Ruby on Rails, Tips and Tricks, Topics, Tutorials | No Comments »

Spree Commerce, eBay Trading API, and the eBay Accelerator Toolkit from Intradesys EbatNs

In this bit, I talk about using the EbatNs SDK for the eBay Trading API, to list items from your Spree Commerce store, or really any rails application. Filled with production code examples from an honest to god real live and working spree site that interfaces with the eBay trading API to Add, Revise, and End items, on ebay when they sell in your store, or on your store when they sell on eBay.

Tags: , , ,

Posted in: eBay, PHP Tutorials, PHP/MySQL, Tips and Tricks, Web Design | No Comments »

HowTo Knock it off with crazy MYSQL queries and the qTranslate plugin unistall

We’ve all done it. Either we learn some tricks in MYSQL, or read a cool post about some obscure programming trick you can do with SQL and decide to try it in a pinch on a live database. Just don’t do it. 9 times out of 10 you have access to SSH, and PHP, and [...]

Tags: , , ,

Posted in: Computer Science, MySQL, PHP Tutorials, PHP/MySQL, Tips and Tricks, Topics | No Comments »

HowTo html input find/replace regex

Whenever I make a form, it’s a bit of a hassle to add in the php support. That is, if the page gets reloaded of sent back, we want to insure that all the valid data that was entered before is maintained. And easy way to do this is: Here is an easy way, tested [...]

Tags:

Posted in: PHP, PHP Tutorials, PHP/MySQL | No Comments »

Simple PHP closure/lamda/anonymous function usage.

This is a fun little example of the new Closure features in php. ?View Code PHPclass TArray { public $pMembers = array(); public $pCurrentIndex = 0; public function __construct() { $args = func_get_args(); if (empty($args)) return; if (count($args) == 1) $args = $args[0]; foreach ($args as $arg) array_push($this->pMembers,$arg); } public function push() { $args = [...]

Tags: , ,

Posted in: OOP, PHP Tutorials, PHP/MySQL, Topics | No Comments »

Saving Array to MySQL Table

I thought that I would start by making a few posts about some common task, especially in php. One thing that comes up often, id how to dynamically munge and save an array, for instance from $_POST, to the database? The answer is easier than you might think, first, let’s create a munging function, which [...]

Posted in: MySQL, PHP Tutorials | No Comments »

Powered by Wordpress. Design: Supermodne.