0
Hi guys you might know this about qr code im just a newbie here, my problem is that i can't produce simple  qrcode that will fetch the data through the database , i wanted to create a single row of database and display it as a qrcode, can you help me?

here's my code so far
<?php
 include "qrlib.php";    
include "includes/config.php";
        $con = mysql_connect('localhost','root','');
        mysql_select_db('oswa_inv', $con); 
        $result = mysql_query( 'SELECT * FROM products WHERE id = `id`');     
//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';
while ($row = mysql_fetch_assoc($result))
  {
   $filename = ''.$row['name'].$row['serial_number'].$row['model'].$row['description'].$row['location'].'';
    echo '<img src="'.$PNG_WEB_DIR.basename($filename).'" /><hr/>'; 
   } 
?>
2
Contributors
4
Replies
17
Views
11 Months
Discussion Span
Last Post by rheiniel
0

i want to generate a qrcode and the details i want to include inside of the qrcode is in my database

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.