Menu

#2 noob... need help getting started

v1.0 (example)
pending
nobody
None
5
2013-06-14
2013-06-13
Ken
No

I got my php knowledge from a book and end up lost on trying to customize this qr code. I'm trying to add a new section as in "name, email address, subject, and etc" so it will generate all on one code. I understand creating the "config form" for them but do I acutally have to go in and customize all the others library as well?

Any help would be appreciated

Thanks,
Ken

Discussion

  • Dominik Dzienia

    Dominik Dzienia - 2013-06-14

    Generally workflow will be:

    1. add new form fields
    2. FORMAT field to desired text format, for adress card it will be VCARD format
    3. call lib as usual, instead of simple text feed it with formated text

    more about VCARD: google & https://sourceforge.net/p/phpqrcode/wiki/Common%20usages/#contact-card-vcard

    sample:

    $text = 'BEGIN:VCARD'."\n".'VERSION:2.1'."\n".'N:'.$_POST['form_name_name']."\n".'TEL;WORK;VOICE:'.$_POST['form_phone']."\n".'END:VCARD';
    

    remarks:

    • new lines are required by VCARD format
    • this is bad example, in production code it is better to check does $_POST fields are sane (like - right format, not too long, secure etc)
     
  • Dominik Dzienia

    Dominik Dzienia - 2013-06-14
    • status: open --> pending
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.