prepare("select * from stall_details") ; $sqlstal->execute() ; while($addro = $sqlstal->fetch(pdo::FETCH_ASSOC) ) { $mname = $addro['market'] ; $stallno = $addro['stall_no'] ; $ansid = $addro['ansid_no'] ; $eno = $addro['en_no'] ; $enarray[] = $eno ; $snarray[] = $stallno ; $storen[] = $stallno ; } //qrcode Gen //{ //$clientid = 'ANMARKDEV01' ; //$clientid = $regno ; // $_SESSION['userp'] ; //$pwd = $_SESSION['clientpwd'] ; //get data from address $sqladdres = $DBcon->prepare("select * from allotee_biodata") ; $sqladdres->execute() ; while($addrow = $sqladdres->fetch(pdo::FETCH_ASSOC)) { $phone = $addrow['allote_phone'] ; $email = $addrow['allote_email'] ; $name= $addrow['custodian'] ; $reg= $addrow['regno'] ; $listphone[] = $phone ; $namearray[] = $name ; $regarray[] = $reg ; } //get data from stall data /* $sqls = $DBcon->prepare("select * from stall_details") ; $sqls->execute() ; while($addros = $sqls->fetch(pdo::FETCH_ASSOC)) { $mname = $addros['market'] ; $stallno = $addros['stall_no'] ; $en= $addros['en_no'] ; $zone = $addros['zone'] ; $storen[] = $stallno ; } */ //$govt = "An approved e-governance initiative by The Govt. of Anambra State." ; //$coda = $clientid.'-'.$phone.'-'.$name.'-'.$gender.'-'.$email.'-'.$mname.'-'.$stallno.'-zone'.$zone.'-'.$govt ; //get the number of page to generate for ($x = 97; $x <= 100; $x++) { $comp = "X5M GLOBAL MAX-DATA CONCEPT LTD" ; //$coda1 = $clientid.'-'.$comp; $clientid = $regarray[$x] ; $phones = $listphone[$x] ; $names = $namearray[$x] ; $stallno = $storen[$x] ; $enos = $enarray[$x] ; $zone = "" ; $emails = "" ; $govt = "An approved e-governance initiative by The Govt. of Anambra State." ; $coda = $clientid.'-'.$enos.'-'.$phones.'-'.$names.'-'.$emails.'-'.$mname.'-'.$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); ?>