1

Topic: help with a small voting script! PHP/Mysql

Hey :-)

I'm pretty new to all this, hope 'you' will help me with my little projekt...

I want to make a kind og voting script not supposed to be shown in the forum, just on another 'clean' page, where the user should login with the punbb name and pass. Thereby giving them acces to the page where a certain amount of forms (let's say 5 in this case) are placed, the 5 forms "choice's" is supposed to be filled with some names (which I have in another DB)

I plan to fill the forms using:

$query  = "SELECT name FROM namelist";
$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
    echo "Name :{$row['name']} <br>";

}

The user should then select different names in all the forms and push a button, and then update the 5 name choices to their profile, so that the next time they go to that page, the forms show the names they have previusly selected, and they can change the names again.

I would also like to be able to, differentiate between the different forms , so for example they are choice1, choice2... where I can count and rank the names which is in 'choice1' form field.

It should then be possible to extract how many have selected the different names with a mysql call...


I'm not quite sure how to do this in a good and simpel way. Hope someone have some input to get me a little further :-) thx...