Wednesday, 19 June 2013

jquery-ajax

http://www.jquery4u.com/function-demos/ajax/

http://www.ajax-zoom.com/examples/example26.php

http://api.jquery.com/live/


w3schools.in

Saturday, 8 June 2013

Check Box in php

http://www.html-form-guide.com/php-form/php-form-checkbox.html

http://www.phpeasystep.com/mysql/8.html

http://www.homeandlearn.co.uk/php/php4p11.html

http://www.c-sharpcorner.com/UploadFile/051e29/insert-value-from-radio-button-in-mysql-in-php/

http://www.phpforkids.com/php/php-forms-get-post-checkbox-radio-data.php

http://www.homeandlearn.co.uk/php/php4p10.html

Wednesday, 5 June 2013

Bootstrap Zend Tute

http://net.tutsplus.com/tutorials/php/zend-framework-from-scratch-models-and-integrating-doctrine-orm/

http://roysimkes.net/blog/2009/07/setting-up-a-zend-framework-project-from-scratch/

http://randomitstuff.com/2010/05/04/setting-up-database-configuration-in-zend-framework/


Reading csv file xls file

http://php-drops.blogspot.in/2011/04/read-excel-sheet-xls-file-with-php.html

http://www.homeandlearn.co.uk/php/php10p6.html

Simple Email in PHP

simpleEmail.php

<?php
/* include_once 'library/EmailMarketing.php';
include_once 'application/simple-email/index.php'; */
session_start();
include ('include/header.php');


/* $obj= new SimpleEmail();
$obj->abc(); */
?>
<div style="width:1000px;margin:auto;padding:10px;">
<h2>Send Mail From Here</h2>
<h3 style="color:green">
<?php
if(isset($_SESSION['msg'])) echo $_SESSION['msg'];

?></h3>
<form method="post" action="library/simpleMail.php">
<table>
<tr><td>To</td><td><input type="text" name="to"></td></tr>
<tr><td>From</td><td><input type="text" name="from"></td></tr>
<tr><td>Subject</td><td><input type="text" name="subject"></td></tr>
<tr><td valign="top">Message</td><td><textarea rows="10" cols="50" name="message"></textarea></td></tr>
<tr><td><input type="submit" name="send" value="Send">
</table>
</form>
</div>
<?php
include 'include/footer.php';

sleep(3);
unset($_SESSION['msg']);





libray/simpleEmail.php




<?php
session_start();
//echo "Hello";exit;
if($_POST['send'])

{

$to = $_POST['to'];

$from = $_POST['from'];

$subject = $_POST['subject'];

$msg = $_POST['message'];   

//$mail = "aayijaaij@gmail.com";
//$to="mantu.kumar@samparkweb.com";
//$subject="Registration Confirmation";



    $data= "<table>   
    <tr><td>$msg</td></tr>
    </table>";

    $headers = "MIME-Version: 1.0" . "\r\n";

    $headers .= "Content-type: text/html; charset=iso-8859-1 ". "\r\n";

    $headers .= "Suject:$subject" . "\r\n";
   
    $headers .= "From:$from" . "\r\n";

    $data=mail($to,$subject,$data,$headers);

 if(isset($data))

 {
     //echo "Data Send Sucessfully";
     $_SESSION['msg']="Mail Sended Successfully !";
     //header('Location:http://www.diversifiedseo.com/email-marketing/application/simple-email/test.php');
     header('Location:http://www.diversifiedseo.com/email-marketing/simpleEmail.php');
 }
}
else
{
   
    header('Location:delhibid.com');
}

?>

Tuesday, 4 June 2013

what is the use of @ in PHP?

The @ symbol is the error control operator (aka the "silence" or "shut-up" operator). It makes PHP suppress any error messages (notice, warning, fatal, etc) generated by the associated expression. It works just like a unary operator, for example, it has a precedence and associativity. Below are some examples:
@echo 1 / 0;
// generates "Parse error: syntax error, unexpected T_ECHO" since 
// echo is not an expression

echo @(1 / 0);
// suppressed "Warning: Division by zero"

@$i / 0;
// suppressed "Notice: Undefined variable: i"
// displayed "Warning: Division by zero"

@($i / 0);
// suppressed "Notice: Undefined variable: i"
// suppressed "Warning: Division by zero"

$c = @$_POST["a"] + @$_POST["b"];
// suppressed "Notice: Undefined index: a"
// suppressed "Notice: Undefined index: b"

$c = @foobar();
echo "Script was not terminated";
// suppressed "Fatal error: Call to undefined function foobar()"
// however, PHP did not "ignore" the error and terminated the
// script because the error was "fatal"
What exactly happens if you use a custom error handler instead of the standard PHP error handler:
If you have set a custom error handler function with set_error_handler() then it will still get called, but this custom error handler can (and should) call error_reporting() which will return 0 when the call that triggered the error was preceded by an @.
This is illustrated in the following code example:
function bad_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
    echo "[bad_error_handler]: $errstr";
    return true;
}
set_error_handler("bad_error_handler");
echo @(1 / 0);
// prints "[bad_error_handler]: Division by zero"
The error handler did not check if @ symbol was in effect. The manual suggests the following:
function better_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
    if(error_reporting() !== 0) {
        echo "[better_error_handler]: $errstr";
    }
    // take appropriate action
    return true;
}

Saturday, 1 June 2013

Magento Currency Chage from Home page

http://webdesignsolutions.co.in/how-to-add-currency-selector-to-magentos-header