• Resolved cheflo

    (@cheflo)


    Hi,

    I would like to create a web page where a user can enter form data in fields and when the submit button is clicked the form data should be used to filter a database (csv files for now) for matches and then display the result back to the user. It is pretty close to this demo, but I would like full control over how to score the matches in the data base and report the results back in a more advanced format (calenders, etc.)

    This sounds simple enough, and if I would do it offline, I would just write it in python. However, I am completely new to web development and a little lost in where to start. It seems to me that WordPress is the simplest platform to use for beginners, but I can’t find information on if what I want to do is possible, most of my searches leads to pre made form plugins like gravity where it is unclear to me if I can design the matching algorithm myself.

    I read briefly that I might be able to use HTML forms and PHP scripts to do this in WordPress, but before I go down this route I wonder if it is a viable choice or if there are preferred methods to achieve what I am aiming for. I also, wonder how the overall process would look step by step (just an overview of how to go about this, I can google details myself).

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)
  • Chitcher1

    (@chitcher1)

    Well WordPress is all PHP with a MySQL back-end so you won’t be using python with WordPress. This is a very simple task that involves minor INSERT and QUERY commands that can be called via PHP. You can also look into using JQuery and Ajax if you’d like to get a little more fancy.

    I recommend these books which helped me(I know this is the internet age but dammit books are good too!)

    PHP
    https://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/0321784073/ref=sr_1_1?ie=UTF8&qid=1425595712&sr=8-1&keywords=php+and+mysql+for+dynamic+websites

    JQuery and Ajax
    https://www.amazon.com/Head-First-jQuery-Brain-Friendly-Guides/dp/1449393217/ref=sr_1_1?ie=UTF8&qid=1425595656&sr=8-1&keywords=Head+first+JQuery

    Hope this helps!

    Thread Starter cheflo

    (@cheflo)

    Great, now that I have a few keywords I should be able to get things going. Thanks!

    Thread Starter cheflo

    (@cheflo)

    Just wanted to report back with how I did the overall structure, both for feedback if there is a better way and in case some other newbie finds it useful.

    Briefly, I used the ‘action’ method of the form to redirect the user from the form submission page to the results page I also created on my blog. That results page uses a custom template php-file, which is where I put all my php/sql code that queries and filter the databases. All the variables from the form are available in the $_POST variable so I can assign them like so $email = $_POST['email'];.

    Then I insert them into the database $wpdb->insert("table_name", array(age' => $age, 'email' => $email)); The databases are managed by phpmyadmin, where I create all the columns and tables I need.

    That’s all, if someone thinks this sounds quirky, please let me know a better way.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I build a website to process user form data and display matching results’ is closed to new replies.