Feb 17, 2010
Develop,Package and Install Magento Module/Extension
This is very useful for those who are working in Magento eCommerce. After making an module
(I will post the method to develop a module within few days).
You can also refer this link for time...
read more
Feb 14, 2010
Mail in PHP
I am listing here the method for sending mail using PHP code. This will be useful in many ways, for example when you want to sent mail after say a form is submitted.
Note: This may work in local...
read more
Feb 10, 2010
Extracting String
This is small but very useful script.
I have shown example for extracting only ’src’ value from the ‘img’ tag, but you can modify and use as per your requirement using...
read more
Feb 10, 2010
Page Redirect
I have written a script for getting the files list from directory and redirecting the page on selecting option from the select box.
So you will get the script for fetching all the files from...
read more
Feb 1, 2010
Database Backup
I am listing here the PHP script to generate backup of database.
<?php
/* Database Backup */
$username = "dbusername"; //database username
$password = 'dbpass'; //database password
$hostname...
read more
Jan 26, 2010
Get Database Prefix
I am listing an example for retrieving the Joomla database prefix.
<?php
$db =& JFactory::getDBO(); //Returns a reference to the global database object
echo "Database prefix is...
read more
Jan 22, 2010
Get IP Address in PHP
Many times we need the IP Address of the User visiting our website in our Application.
I am listing here the method to get the User IP Address, hope it might be useful to many of you.
//function...
read more
Jan 21, 2010
Queries in Magento
I am describing here the method for executing custom MySQL queries in Magento.
<?php
//select query
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
//make...
read more
Jan 21, 2010
Assign PHP Array to Javascript Array
I am describing here a very useful method for getting the values of a PHP array in JavaScript.
For this we need to assign the PHP array values to a array in JavaScript.
<?php
$a = array('A','B','C');
?>
<html>
<head>
<title>Assign...
read more
Jan 20, 2010
Copy Directory
I am listing here the method to copy full Directories with all sub-directories and files.
<?php
$source = 'f1'; //folder name
$target = 'f2'; //folder name , if target folder does not exists,...
read more
