• Hi all, I understand that this is probably the easiest script to code but that’s all I know about php and the code

    I want to run a competition on my wordpress site, visitors will signup to win by name & email, a captcha code would be a bonus but is not essential. The main functionality I’m after is the data (names & emails) feeding into an sql database so the data can be downloaded after and easily managed in Excel.

    I am able to download the sql database once the data is recorded, I’m just unsure of the best way to record the data in the database.

    Does anyone know if there is an easy way [ a plugin :o) ] to get this done?
    Or anywhere I could learn the script?

    I really appreciate your help

    Cheers
    James

Viewing 7 replies - 1 through 7 (of 7 total)
  • Use Contact Form 7: https://www.ads-software.com/extend/plugins/contact-form-7/

    And it’s to db extension: https://www.ads-software.com/extend/plugins/contact-form-7-to-database-extension/

    If you want to tackle writing it yourself I’d be happy to help too.

    The simplest plugin that does exactly what you’re asking for is:
    https://www.ads-software.com/extend/plugins/wp-email-capture/

    Thread Starter jamessk

    (@jamessk)

    Thanks for all your help!

    I’m familiar with contact-form-7 but was not aware of the db extension, thank you

    Also I really appreciate your offer Andrew, I’m very keen to learn php. Do you have any tips on where to start?

    Thanks again
    James

    There’s a couple ways to go. For me, php was my first programming (and I use that word liberally with php) language. If that’s the case, you should learn the language from the ground up. Meaning, write some code from a blank white page and go nuts.

    Have a goal. Like, I want to make a form that posts information to a mysql database and has the ability to query the database for information in the future.

    Where to start depends on your beginning knowledge level. Do you know what variables are? Do you know what a loop is (in a programming language)? Etc. Honestly, I’d just google “learn php” and go from there. You have a website so just create a new directory on the root level and play around. If your host allows you to make sub domains, that’d be even better.

    For learning other languages, like python for example, that’s all I did.

    If it’s not your first language, I’d recommend getting acquainted with a framework. I’ve used yii quite a bit and like it, but it’s got a steep learning curve. I’ve heard good things about cake too.

    WordPress, is, sort of, a framework too. It can really make things a lot easier and compared to other frameworks its learning curve and community are second to none.

    If you have “Jetpack” installed, you can use the “Blog Subscriptions” widget.

    This will allow you to stay connected with those that submit there names and emails, then when you are inside “jetpack”/”Site Stats” scroll to the bottom, you will see your followers. If you select “blog” you can download all email address as a CSV file. Which you can later use in Excel as requested.

    You can change the title and text inside the widget to be what ever you like, “Enter our Competition” and description text – you understand

    Thread Starter jamessk

    (@jamessk)

    Thank you for all your help and time

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Collecting Data from Form’ is closed to new replies.