Jump to content

Search the Community

Showing results for tags 'election'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi all, I want to make a quiz but I'm stock in the process. I've created a form with radiobuttons with questions, so for example: Question 1: Q1A,Q1B,Q1C Question 2: Q2A,Q2B,Q2C After visitors filled in the answers, the form post it to my results.php. This works perfectly. Now I have a MySQL database with: +----------+--------+-----+-----+-----+-----+-----+-----+ | PRODUCT | BRAND | Q1A | Q1B | Q1C | Q2A | Q2B | Q2C | +----------+--------+-----+-----+-----+-----+-----+-----+ | | | | | | | | | | product1 | Apple | 1 | 0 | 1 | 0 | 1 | 0 | | | | | | | | | | | product2 | HP | 0 | 1 | 1 | 1 | 1 | 1 | | | | | | | | | | | product3 | Dell | 0 | 0 | 0 | 0 | 1 | 0 | | | | | | | | | | | product4 | Compaq | 1 | 1 | 1 | 0 | 0 | 0 | +----------+--------+-----+-----+-----+-----+-----+-----+ So if the user select Q1C in question A and Q2A in question B, I want to count all the values from the selected columns, so in this case: Product1 = 1 + 0 = 1 Product2 = 1 + 1 = 2 Product3 = 0 + 0 = 0 Product4 = 1 + 0 = 1 Product 2 wins and is most relevant. I then want to show the top 3 on the page. In total I have about 20 questions and 400 products and I want to create a top 3 list, based on the selected answers. I have a few questions: 1) Is this possible? Or are there better ways to make a election/voting script? Any examples? 2) How can I add the values from multiple columns together and make a total score for the visitor? For example, I need something like this: http://www.stemwijzer.nl/votematch2k2006/app.html I really hope you guys can help me with this! I really want this!! Thanks so much in advance!! Kind regards, Mark
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.