Module Development - Is it correct to use SESSION to check if person entered receipt barcode?
Return to previous page
Module Development - Is it correct to use SESSION to check if person entered receipt barcode?
Add an Answer
Your question has been submitted and is awaiting moderation.
Thank you for reporting this content, moderators have been notified of your submission.
I want to build a new module for DNN 6.2.4. Basically I have entire sections of a website that's only viewable if user enters a valid barcode from a receipt. We validate barcodes by checking if it's a multiple of 3. If it's not, then the the user can never see this private section of the website.
I want to build my own module that will take a form variable like $_REQUEST['barcode_number'], and check if it's a multiple of 3. If it is, then set the Session['is_valid_user'] = 1;
Then on my private pages, I check if Session['is_valid_user'] == 1. If it is, then let the view the private pages. If not, then redirect them to an external website like google.
Is this the right approach for development? Or is there an off-the-shelf DNN module that I can use?