Hi. I'm working with IIS4 & PHP4 and latest mysql in my windows NT server 4.0
I'm developing a site of models. The visitor has the possibility
to vote for his favourite model. The database contains these fields:
number_of_model int(2)
name_of_model char(200)
age_of_model int(2)
description LONGTEXT
votes int(3) //i keep in this column the quantity of times she's been voted
img_url char(200) //the link to her image_file
When i open list.php3 i see all the list of models, images, votes, age, etc
This list is ordered by quantity of votes, first in list is the one with more votes, ovbiously
I've done this:
...
$result = mysql_db_query("$db","SELECT * from $table_models order by votes DESC");
...
When user wants to vote a model, he has to click a link which calls make_a_vote.php3 in this way
print('<a href="make_a_vote.php3?number_model=');
echo $array_of_models[0][3]; //array_of_models contains all data taken from models
print('">Vote this model !!</a>');
When make_a_vote.php3 file opens in browser it shows right model, image, name, age, etc, so the user can see the model he is going to vote again. Then i exec this:
...
mysql_db_query("$db","UPDATE $table_models SET votes=votes+1 where number_of_model = $number_model");
...
All the code i wrote works fine BUT:
After the user has voted, i exec a script or whatever that launchs again list.php3 file, so the user can see the new list ( he has voted, so the list has changed... )
I don't know what to do, so i can see modified list. I've seen that the votes field has been modified correctly, but i can't see in the list. I get no good results !! Even if i call the file in this way: list.php3?
I've heard that when you put a ? after the php file name it loads again with current data. I've tested by doing like this also, but it works only the first time: list.php3?whatever=sheet
What can i put, so the list loads with current/actual data ALWAYS !!??
What can i do to avoid the visitor from voting more than 3 times ?
I think that php file desn't load with current data cause
it maybe a cache problem of my navigator... i'm using IE4 on my NT4 server..
What maybe wrong ?
Thanks in advance. PLZ HELP !!
<?php echo "Sorry 4 this long & boring posting !!" ?>