Archive for the ‘php’ Category

PHP Email Validation

PHP email validation
function checkEmail($email)
{
$pattern = “^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$”;
if (eregi($pattern, $email))
{
return true;
}
else
{
return false;
}
}

Read the rest of this entry »

calculate age in php

function calculateAge($birthday){
return floor((time() – strtotime($birthday))/31556926);
}
$strDOB = ‘1979-10-14′;
echo ‘<br />’.calculateAge($strDOB);

Read the rest of this entry »

Zend Framework Components

Model-View-Controller (MVC)

Zend_Application, Zend_Application_Bootstrap, Zend_Application_Module, Zend_Application_Resource
Zend_Controller_Front, Zend_Controller_Action, Zend_Controller_Dispatcher, Zend_Controller_Plugin, Zend_Controller_Router
Zend_Form
Zend_Layout, Zend_View, Zend_View_Filter, Zend_View_Helper

The above components make use of the industry standard web application design pattern MVC (which originated with one of [...]

Read the rest of this entry »

ZEND FRAMEWORK

INTRODUCTION TO ZEND FRAMEWORK
Zend Framework was designed and built to improve developer productivity. Unlike other frameworks that require large configuration files to work, most aspects of a Zend Framework application can be defined at runtime using simple PHP commands. This saves developers time because instead of complex configuration files controlling every aspect of the application, [...]

Read the rest of this entry »

PHP Email with attachment

<?php
// Read POST request params into global vars
$to = $_POST['to'];
$from = $_POST['from'];
$subject = $_POST['subject'];
$message = $_POST['message'];
// Obtain file upload vars
$fileatt = $_FILES['fileatt']['tmp_name'];
$fileatt_type = $_FILES['fileatt']['type'];
$fileatt_name = $_FILES['fileatt']['name'];
$headers = "From: $from";
if (is_uploaded_file($fileatt)) {
// Read the file to be attached ('rb' = read [...]

Read the rest of this entry »

Magento Opensource eCommerce Solutions

Hi, I am a web developer and I have customized various eCommerce portals such as Virtue Mart in Joomla, osCommerce etc… But Now I guess the trend has changed entirely…
A fresh new platform for eCommerce have arrived in the web world giving the developers all around the world a sigh of relief.
It’s Magento opensource eCommerce [...]

Read the rest of this entry »

Microsoft and open source developer Zend have entered a multi-year, multi-phase partnership to make sure Web deployment language PHP runs as well on Windows as Linux.

In an unusual move, software giant Microsoft has entered into a multi-year, multi-phase agreement with open source software developer Zend Technologies to ensure that the popular Web development language PHP runs as well under Windows as it does on Linux and other platforms.
The move is a rare bow to the open source community from Microsoft, [...]

Read the rest of this entry »

.htaccess settings for osCommerce 2.2 on LAMP Architecture

Last week, we had project where we have to install and customize the new osCommerce 2.2rc2a on one of our client server having php5 and apache 2.2
The problem here is that the apache 2.2 by default does not takes the long arrays that is $HTTP_GET_VARS, $HTTP_POST_VARS

Read the rest of this entry »

PHP5 VS PHP6

PHP is actually a set of extensions that are bundled together in order to make what we currently have, these extensions can be changed. Let’s take for example the XML Writer extension. It is best extension for writing the XML files. A similar extension, XML Reader, has already been attached and allowed in the essential [...]

Read the rest of this entry »
 

Switch to our mobile site