Pagination with jQuery, MySQL and PHP.

November 29th, 2011 admin Posted in JavaScript & AJAX Tutorials, PHP & MySQL No Comments »

I received lot of requests from my readers that asked to me how to implement Pagination with jQuery, PHP and MySQL. so I had developed a simple tutorial. It’s looks big but very simple script. Take a look at this live demo

Read the rest of this entry »

AddThis Social Bookmark Button

codepad is an online compiler/interpreter, and a simple collaboration tool

July 13th, 2011 admin Posted in PHP & MySQL No Comments »

Codepad is an online compiler/interpreter, and a simple collaboration tool.
Paste your code below, and codepad will run it and give you a short URL you can use to share it in chat or email.

codepad was created by Steven Hazel, one of the founders of Sauce Labs.

Sauce Scout lets you check out your web site in any browser, without running virtual machines or installing anything.

AddThis Social Bookmark Button

Import and export data mysql size large

January 16th, 2011 admin Posted in Open source, PHP & MySQL No Comments »

1. MySQLDumper is a PHP and Perl based tool for backing up MySQL databases. You can easily dump your data into a backup file and - if needed - restore it. It is especially suited for shared hosting webspaces, where you don’t have shell access. MySQLDumper is an open source project and released under the GNU-license. Read the rest of this entry »

AddThis Social Bookmark Button

script php xml to array

December 8th, 2010 admin Posted in PHP & MySQL No Comments »

xml2array() is a easy to use PHP function that will convert the given XML text to an array in the XML structure. Kind of like my Javascript xml2array() function. Read the rest of this entry »

AddThis Social Bookmark Button

A Modular Directory Structure Quickstart: Module Switcher Front Controller Plugin

November 12th, 2010 admin Posted in Open source, PHP & MySQL No Comments »

Hello and welcome to the second installment in the Zend_Application tutorial series.  In this tutorial, we are going to create a front controller plugin that is going to change out modules based on the user’s request.

In the front controller design pattern, a single controller takes and handles all user requests. For an application of moderate to severe complexity, a front controller delegates the responsibility to command controllers (also called dispatchers), routers that map user requests and various URIs to actual controllers and actions, registers view helpers and other resources that a user may request.  A front controller can help eliminate duplicate code on a series of requests by routing the requests through the front controller and factoring the duplicate code from the requests into the front controller.Here are some excellent resources on the subject:

Hopefully by now you have a bit more understanding about what the Front Controller is, and how it operates in the Zend Framework.

Now we will create our Front Controller Plugin that will switch our modules layouts. Read the rest of this entry »

AddThis Social Bookmark Button

How to integrate phpbb forum login

November 2nd, 2010 admin Posted in PHP & MySQL No Comments »

I have had to install phpbb forum on a website that already had a user table and I want to keep the users of my table as the only users of the web site. I want to give to my users the access to the phpbb functionalities. Read the rest of this entry »

AddThis Social Bookmark Button

Creating a Date Range Array with PHP

November 2nd, 2010 admin Posted in PHP & MySQL No Comments »

I recently needed to come up with an array of dates between two given dates. I typically work in the MySQL-compatible ‘YYYY-MM-DD’ date format, so I wanted it to use dates like that. So I came up with the following function:

function createDateRangeArray($strDateFrom,$strDateTo) {
// takes two dates formatted as YYYY-MM-DD and creates an
// inclusive array of the dates between the from and to dates.

// could test validity of dates here but I’m already doing
// that in the main script

$aryRange=array();

$iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2),     substr($strDateFrom,8,2),substr($strDateFrom,0,4));
$iDateTo=mktime(1,0,0,substr($strDateTo,5,2),     substr($strDateTo,8,2),substr($strDateTo,0,4));

if ($iDateTo>=$iDateFrom) {
array_push($aryRange,date(’Y-m-d’,$iDateFrom)); // first entry

while ($iDateFrom<$iDateTo) {
$iDateFrom+=86400; // add 24 hours
array_push($aryRange,date(’Y-m-d’,$iDateFrom));
}
}
return $aryRange;
}

Note that the first parameter of my mktime function calls is a 1 due to problems I experienced before with Daylight Savings Time.

Read the rest of this entry »

AddThis Social Bookmark Button

Zend Framework Basic Tutorial

July 1st, 2010 admin Posted in PHP & MySQL No Comments »

Zend Framework is open source PHP Framework.

What is Zend Framework?

  • framework for building web faster and robust.
  • Created by the company main supporters of PHP, Zend.
  • Supporting web 2.0 and cloud computing technologies.

Why Zend Framework?

  • Free and open source framework
  • Extreme Simplicity
  • High productivity
  • Flexible Architecture
  • Supported by more than 300 contributor, include IBM and other major companies Read the rest of this entry »

AddThis Social Bookmark Button

Zend Framework: Using Smarty as template engine

July 1st, 2010 admin Posted in PHP & MySQL No Comments »

Zend Framework’s View class has very bad capability for extending. It contains template variables but does not allow to access them, it has array with different pathes (templates, filters), but does not allow to add another type or access them. Therefor only way to use Smarty with Zend Framework is to abandon Zend_View and manipulate Smarty object directly. Read the rest of this entry »

AddThis Social Bookmark Button

DataGrid for Zend Framework

July 1st, 2010 admin Posted in PHP & MySQL No Comments »

Top Features:

  • Doctrine Support
  • Zend_Form for CRUD operations
  • Zend_Config Support
  • Multiple Instances per page (no conflicts at all…)
  • Support for Extra Rows
  • Conditional Fields Presentation
  • Option for detailed view
  • PRG Form processing
  • Render specific parts separately (filters, titles, pagination, etc…)
  • Conditional Fields Rendering
  • jqGrid Rendering => Demo: http://zfdatagrid.com/grid/default/jqgrid
  • Open Flash Chart support => Demo: http://zfdatagrid.com/grid/default/site/ofc
AddThis Social Bookmark Button