prepare("select * from changeo where sn =:ss") ; $sqlallo->bindparam(":ss",$regno) ; $sqlallo->execute() ; if($sqlallo->rowcount() > 0) { $addrow = $sqlallo->fetch(pdo::FETCH_ASSOC) ; $po = $addrow['fowner'] ; $no = $addrow['nowner'] ; $market = $addrow['market'] ; $enno = $addrow['enno'] ; $fdate = $addrow['fdate'] ; $lga = $addrow['lga'] ; $shopno = $addrow['shopno'] ; $pdate = $addrow['pdate'] ; $adm = $addrow['admin'] ; $phone = "" ; } // Get the current date $date = getdate(); // Get the value of day, month, year $currentDay = $date['mday']; //$currentMonth = $date['mon']; //$currentMonth = $date['m']; $currentWeekday = $date['wday']; $month = $date['month']; $year = $date['year']; // $comp = "X5M GLOBAL MAX-DATA CONCEPT LTD" ; //$coda1 = $clientid.'-'.$comp; $clientid = $no; $phones = $phone ; $names = 'Previous Owner'.'-'.$po ; $stallno = $shopno ; $enos = $enno ; $zone = "" ; $emails = "" ; $govt = "An approved e-governance initiative by The Govt. of Anambra State." ; $coda = $clientid.'-'.$enos.'-'.$phones.'-'.$names.'-'.$emails.'-'.$market.'-'.$stallno.'-zone'.$zone.'----'.$govt.'----'.'In Agency with'.'---'.$comp ; //set it to writable location, a place for temp generated PNG files $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //html PNG location prefix $PNG_WEB_DIR = 'temp/'; //ofcourse we need rights to create temp dir if (!file_exists($PNG_TEMP_DIR)) mkdir($PNG_TEMP_DIR); $filename = $PNG_TEMP_DIR.'test.png'; $errorCorrectionLevel = 'L'; $matrixPointSize = 2; // user data $filename = $PNG_TEMP_DIR.'test'.md5($coda.'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; QRcode::png($coda, $filename, $errorCorrectionLevel, $matrixPointSize, 2); // ?>