Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Posts posted by cmgmyr

  1. yes that would add another row. another way that you can do it is with an update. but then you will have to enter a "totals" column to have the total amount of votes then calculate the average with "rating" and "totals"

  2. you would set the action of the form to something like "do_rate.php"

     

    do_rate.php

    <?php
    
    $rating = $_POST['rating'];
    $bandid = $_POST['bandid'];
    
    $sql = "INSERT INTO rate (rating,bandid) VALUES ('$rating', '$bandid')";
    mysql_query($sql);
    
    echo "Thank you for rating!";
    
    ?>

  3. Probably more like:

     

    rateid  bandid  rating

    1        2          5

    2        2          3

    3        8          2

    4        5          4

    5        6          5

     

    ...but yeah :)

  4. just have a radio group with the values 1-5, put a hidden field in there that has the userid of the band. When they submit the form point that to a processing script that takes the bandid and the rating and insert it into the database.

  5. you have to get a few more posts in order to send a PM.

     

    anyways...I think you should make a poll with MySQL it will be a lot easier to manage that way and you wont have to worry about physical files.

  6. no problem, all you need to do is ask :)

     

    if it is something general about php/mysql post it in here, if it is something more about a music site you can send me a PM or IM me (like how I did something)

×
×
  • 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.