Saving and Using User Data

  • Hi all

    I thought and hoped this would be a super easy thing to achieve in WordPress but I’ve not been able to find the solution.

    So very simply put, I want to have a page on my website with two sections on the same page (let’s call them Section A and Section B), each with a separate question:

    Section A:

    Want an offer code? Enter your name and mobile number here:

    Name: [Name]
    Mobile/Cell: [TelNumber]

    [GO]

    Section B:

    Got an offer code? Enter it here: [Offer Code] [GO]

    Depending on what the user wants to do, they will enter either [Name] and [TelNumber] in Section A or [offer code] in Section B and press [GO]

    If user completed Section A, I want the website to send a preset SMS message (using an SMS Gateway plugin) to that tel number with a randomly generated, unique, [offer code], eg:

    Hey John! Thanks for registering. Your unique offer code is ZASKJHD*112S. Use it now at website.com to get some great offers.

    And [Name] and [TelNumber] and generated [Offer Code] should all be stored in a database (together with various other auto-generated information such as registration date, IP address, etc etc) as soon as user completed Section A.

    If user completed Section B, I want the website to check the entered [Offer Code] against the database, and either say “no such offer code registered” or if found, return whichever required values from the same record, eg on entry of ZASKJHD*112S (a registered Offer Code in the database), the system would return:

    Hi John – nice to have you back!

    Users should also be able to log in using standard email/password registration (and social media plugins) and all details relating to same user stored in one record.

    Importantly, users should be able to put **someone else’s** name and mobile number to send codes to others, so that would create a ‘non-registered’ person record of just a name and mobile number and offer code but awaiting other details (for when that person enters their offer code).

    Anything like this exist that would allow me to create this kind of flow??

  • IMPORTANT I am not looking for a coupon or gift voucher plugin, my example is just suggesting offer codes as that makes it easy.

    But the key is being able to generate random codes, which are then stored in a database along with other creation time details, which can then be accessed later.

    Each user could have generated several ‘random code’ entries, using Section A in described previous post, eg

    User Name:
    Joe Bloggs
    Generated Codes:
    [random-code-1], [name1], [telnumber1]
    [random-code-2], [name2], [telnumber2]
    [random-code-3], [name3], [telnumber3]

    and then other (unregistered) users could visit website and enter [random-code-2] and system would then recognise that and display whatever other fields we decide to from the original connected record ie we could return [name2] and [telnumber2] which are directly associated to that code or even Joe Bloggs which is other parts of the same record.

  • Hi there!

    Since you would need plugins to achieve this, you would need to upgrade to plan Business:

    https://wordpress.com/support/business-plan/

    As for plugin recommendations, I would suggest posting to the community forums at https://wordpress.org/support/forums/.
    Since the free WordPress.com users are not able to install plugins on their sites, you will not likely get many ideas from here :)

  • The topic ‘Saving and Using User Data’ is closed to new replies.