My apologies for the large email, but I wanted to include all the source code for
interested folks and thank everyone who provided suggestions for implementing "hot or
not"-like functionality.
Here is what I ended up doing. I've stripped out alot of the formatting to make it as
readable as pos
: "Peter Beckman" <[EMAIL PROTECTED]>
To: "Matthew Horn" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, 28 May, 2003 10:29
Subject: Re: [PHP-DB] hotornot functionality
Uh, why not just do this:
Then on the next page, you can get the id. Or geez, it
Uh, why not just do this:
Then on the next page, you can get the id. Or geez, it's gonna be there
anyway -- after you do the insert/update of your vote, just pass that ID to
the function that displays the page.
function display($x) {
if (!empty($x['vote'])) {
db_query("insert into
I think the best way is to use sessions.
when the user comes to the site or he submits a rating, start a
session and create a variable, in which you store the images' id that
the user rated like
$var="1,1423,523"
etc.. then use it in your query
mysql_query("select id from images where id not in ($v
e array so they can start over
you get my point ? (sorry for my bad english)
how about this idea?
greeting , mark
-Original Message-
From: Matthew Horn [mailto:[EMAIL PROTECTED]
Sent: woensdag 28 mei 2003 14:56
To: [EMAIL PROTECTED]
Subject: [PHP-DB] hotornot functionality
I am toying w
Why not have a field called last in the db? You set it equal to true for
the last image and then check it for all of the images. If it's true, you
just null the next option and the user can't go any farther.
From: Matthew Horn <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
I am toying with the idea of implementing functionality similar to the hotornot.com
site -- for a different purpose, mind you, but the same kind of user experience.
Here's what it does:
1. A picture is served up.
2. User clicks on a radio button scale from 1 to 10 to "rate" the picture.
3. The