Edit file File name : generatelabel.php Content :<?php session_start(); include("../include/config.php"); include("../include/functions.php"); include("../include/simpleimage.php"); ?> <!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> <title><?php echo SITE_TITLE; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/admin.css" rel="stylesheet" type="text/css" /> </head> <body> <?php if($_REQUEST['submitForm']=='yes'){ $itemarr =$_POST['itemid']; $orderid=$_POST['order_id']; if(count($itemarr)>0){ $item_ids=implode(",",$itemarr); echo "test"; include("printLabel.php"); $_SESSION['sess_msg']="Label Generated Successfully.!"; }else{ $_SESSION['sess_msg']="Label can not be generated.!"; } } ?> </body> </html> <script> var is_chrome = function () { return Boolean(window.chrome); } if(is_chrome) { window.print(); setTimeout(function(){window.close();}, 20000); //give them 10 seconds to print, then close } else { window.print(); window.close(); } </script> Save