02 May, 2024

php date() Formatting

<?php $today = date(“F j, Y, g:i a”); // March 10, 2001, 5:16 pm $today = date(“m.d.y”); // 03.10.01 $today = date(“j, n, Y”); // 10, 3, 2001 $today = date(“Ymd”); // 20010310 $today = date(‘h-i-s, j-m-y, it is w Day’); // 05-16-18, 10-03-01, 1631 1618 6 Satpm01 $today = date(‘it is the jS day.’); […]

Share your Love
1 min read

php date() and mktime() example

This can be more reliable than simply adding or subtracting the number of seconds in a day or month to a timestamp because of daylight saving time. <?php $tomorrow = mktime(0, 0, 0, date(“m”) , date(“d”)+1, date(“Y”)); $lastmonth = mktime(0, 0, 0, date(“m”)-1, date(“d”), date(“Y”)); $nextyear = mktime(0, 0, 0, date(“m”), date(“d”), date(“Y”)+1); ?>

Share your Love
1 min read

How magento save value in session?

if you want to save “Test value” in “SessionMessage” variable $sessionValue = ‘Test Value’;Mage::getSingleton(‘core/session’)->setSessionMessage($inputMessage); If you want to read value form “SessionMessage” $outputMessage = Mage::getSingleton(‘core/session’)->getSessionMessage();echo $this->__($outputMessage);

Share your Love
1 min read

Money Booker Payment Integration

  <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Untitled Document</title> </head> <body> <form action=”https://www.moneybookers.com/app/payment.pl” method=”post” target=”_blank”> <input type=”hidden” name=”pay_to_email” value=”merchant@moneybookers.com”> <input type=”hidden” name=”status_url” value=”merchant@moneybookers.com”> <input type=”hidden” name=”language” value=”EN”> <input type=”hidden” name=”amount” value=”39.60″> <input type=”hidden” name=”currency” value=”GBP”> <input type=”hidden” name=”detail1_description” value=”Description:”> <input type=”hidden” name=”detail1_text” value=”Romeo and Juliet […]

Share your Love
1 min read

Integrate Alertpay payment gateway

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>Untitled Document</title> </head> <body> <form method=”post” action=”https://www.alertpay.com/PayProcess.aspx” > <input type=”hidden” name=”ap_purchasetype” value=”item”/> <input type=”hidden” name=”ap_merchant” value=”apdevforum@gmail.com”/> <input type=”hidden” name=”ap_currency” value=”USD”/> <input type=”hidden” name=”ap_itemname_1″ value=”Item 01″/> <input type=”hidden” name=”ap_itemname_2″ value=”Item 02″/> <input type=”hidden” name=”ap_itemname_3″ value=”Item 03″/> <input type=”hidden” name=”ap_description_1″ value=”Lorem […]

Share your Love
1 min read

2 Quick and Efficient Ways to Import MySQL Database

A common task in database management is exporting and import MySQL database. You can use this procedure to transfer data between servers, backup data, or restore data to a previous state. These tasks can be completed in a number of ways, including with command-line tools and graphical user interfaces. The procedures for exporting and importing […]

Share your Love
4 mins read