Solved

Generate bar code after form submission

Posted on 2012-03-30
6
435 Views
Last Modified: 2012-03-31
Hello.

I'm hosting a big event soon and I'll have participants register using an online form. For my forms I'm using a third party software that handles everything.  

What I'm wanting to do is to generate a "unique code" for each of the people that sign up. I mean, once a user submits a form they would get a Bar code or something similar that they can print, they would then present that code to us the day of the event; this code would allow us to easily identify the person since we would scan it. We have both a bar code scanner and a QR code scanner.

Is there a script or something similar that can accomplish this?  

I hope this makes sense. Thanks for your comments.
0
Comment
Question by:Jacko_Pinto
  • 3
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Joe Winograd, EE MVE
ID: 37789047
Easiest thing to do is simply use a bar code font. Generate a unique number for each form (from 1 to N, or whatever range you want to use) and then enter that number with the bar code font. Here are two free ones that I've used...both work well:

http://www.barcodesinc.com/free-barcode-font/
http://www.dafont.com/barcode-font.font

Regards, Joe
0
 

Author Comment

by:Jacko_Pinto
ID: 37789661
Thanks Joe,

I guess now I'm stuck as in how to automatically generate a number for each participant. I guess I could use the ID but then I wouldn't know how to turn that number into a bar code using the font. (Total newbie here)

Thanks for commenting!
0
 
LVL 53

Accepted Solution

by:
Joe Winograd, EE MVE earned 300 total points
ID: 37789719
You say that you're using third-party software for the forms that handles everything. I'm sure the third-party will have the skills to generate a unique number for each form...could be as simple as 1 to N. This is a very common thing to do...I'd be stunned if they couldn't do it. I'd also be stunned if they couldn't place each number in a standard bar code font, such as a very popular one called "3 of 9". For example, the form could look something like this:
12345-barcode-3of9The bar code above is actually the number 12345 in the "3 of 9" font (for participant 12345...could be 00001 or 99999 or whatever). If your third-party can't do this, you need a new third-party. :)   Regards, Joe
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Assisted Solution

by:designatedinitializer
designatedinitializer earned 200 total points
ID: 37789741
You can use this to generate a QR code:

<?
generateQRwithGoogle($user_email);

function generateQRwithGoogle($input,$widthHeight ='150',$EC_level='L',$margin='0') {
    echo '<img src="http://chart.apis.google.com/chart?chs='.$widthHeight.
'x'.$widthHeight.'&cht=qr&chld='.$EC_level.'|'.$margin.
'&chl='.$input.'" alt="QR code" widthHeight="'.$widthHeight.
'" widthHeight="'.$widthHeight.'"/>';
}
?>

I would use the user email because that will surely be unique and identifies the user.
You can use whatever you want.
0
 
LVL 53

Expert Comment

by:Joe Winograd, EE MVE
ID: 37789804
A potential problem with using the email address is that not everyone may be willing to divulge it, being concerned about getting buried with marketing emails (aka spam). Also, depending on the demographics of your participants, not everyone may have an email address.
0
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37789838
joe:
...that's irrelevant.
I think it's pretty obvious Jacko_pinto will not use email addresses if his form doesn't require one (!) and thus will go with a serial form number as already suggested...
However, if his form requires an email address that problem is already solved in a much cleaner way.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question