Home>

I will ask you a question for the first time.
Thank you in advance.

I create a circle member management site using PHP, JAVAScript, and MySQL.

On the circle member list page
I wanted to display a part of my personal information (name, place of birth, etc.) with QR code
Google Chart API
"<img src ="http: //chart.apis.google.com/chart? Cht = qr&chs = 130x130&chl = https: //on-ze.com">"
Created a QR code using.

The QR code was created on the screen, but the information in the QR code could not be changed as expected.
The content of the QR code is not a string or URL.
How can I put my name in the database into the information in the QR code?

<img src ="http: //chart.apis.google.com/chart? cht = qr&chs = 130x130&chl = https: //on-ze.com">
Even if you put the column name of the database after "chl =" in, it will be displayed as a character string as it is.
Entering $value ['last_name'] is not the last name of the database
When reading the QR code, it was the string "$value ['last_name']".

How can I put database information into a QR code?
Should I create QR codes using JAVAScript or other methods?

Thank you.

**Fix**

I ’m sorry I did n’t understand how to ask questions.

Get the name and hometown from the database for the QR code,
When reading the QR code with a QR code reader
I want my name and my birthplace to be displayed.

You may have to enter your name directly when creating the QR code.
Because I wanted to put data that has changed, such as qualifications, in the QR code
I wanted the QR code to get information from the database.

  • Answer # 1

    Maybe it's just a story that$value ['last_name']is not enclosed in<? =?>...

  • Answer # 2

    <img src = "http://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=$value['last_name '] ">


    I understood in the sense that I did
    Then

    <img src = "http://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=<?=$value [ 'last_name']?>">


    I think this is good.

  • Answer # 3

    If you search, there are some easy-to-understand articles.