hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : you probably won't believe this
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

you probably won't believe this

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-28-2002, 05:11 PM
DivaX007 DivaX007 is offline
New Member
 
Join Date: Aug 2002
Posts: 2
Lightbulb

you probably won't believe this


ok. i'm working on my first (soon to be) live site. (i don't have much experience).
i want users to be able to rate pictures on the site and get an accurate count of the votes for each picture. the user also will earn points for coming to the website.
what do i need to learn? (with a GOOD learning curve).

thanks in advance.

Reply With Quote


Sponsored Links
  #2  
Old 08-28-2002, 05:18 PM
steve93138 steve93138 is offline
Junior Guru Wannabe
 
Join Date: May 2001
Posts: 92
Re: you probably won't believe this

Quote:
Originally posted by DivaX007
ok. i'm working on my first (soon to be) live site. (i don't have much experience).
i want users to be able to rate pictures on the site and get an accurate count of the votes for each picture. the user also will earn points for coming to the website.
what do i need to learn? (with a GOOD learning curve).

thanks in advance.
Personally, I would use a MySQL database for storing information about each user. So one thing you would need to learn would be how to access MySQL via PHP.

Reply With Quote
  #3  
Old 08-28-2002, 11:48 PM
Studio64 Studio64 is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Atlanta, GA
Posts: 1,249
Well.. Your in the right forum so thats your first start..
I'd suggest finding a few books about PHP & MySQL..

Basic format:
Display photo.
Ask Hot? (Y/N)
Record Results.

So you want a table like this in MySQL.
PHP Code:
Photos.

int      -> Photo
text   
-> Filename
int      
-> Score 
So you'd display a page like this
PHP Code:
<?
  mysql_connect
// connetion information);
  
$res mysql_query("SELECT * FROM Photos ORDER BY RAND() LIMIT 1");
  
$row mysql_fetch_array($res);
  
$photo $row["filename"];
  
$id $row["ID"];
?>
<html>
<center>
<img src="<?echo $photo?>"><br>

<a href="vote.php?id=<?echo $id?>&vote=yes">Yes</a>
<br>
<a href="vote.php?id=<?echo $id?>&vote=no">No</a>
</center>
</html>
The vote.php would UPDATE the Photo table score either +1 or -1 depending on the vote. Then you could refernce the table again on who's photo has the highest score etc...

Once you understand the basics of PHP & MySQL the rest is quick and simple... I just wrote this on the fly with some time you could make a very advanced version of this.

BTW... I've been drinking... So please don't tear apart my code.

__________________
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }main (){void (*f)() = x;f();}
I wear a gray hat

Reply With Quote
Sponsored Links
  #4  
Old 08-29-2002, 12:28 AM
anantatman anantatman is offline
Web Hosting Evangelist
 
Join Date: Jan 2002
Posts: 453
if you want to get started fast.. do a search for "amigeekornot"

on google.. its an open source website for rating pictures, etc..

you could use a lot of the source code on there.

Reply With Quote
  #5  
Old 08-29-2002, 02:05 AM
Studio64 Studio64 is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Atlanta, GA
Posts: 1,249
Quote:
Originally posted by anantatman
if you want to get started fast.. do a search for "amigeekornot"

on google.. its an open source website for rating pictures, etc..

you could use a lot of the source code on there.
or

http://www.amigeekornot.com/




__________________
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }main (){void (*f)() = x;f();}
I wear a gray hat

Reply With Quote
  #6  
Old 08-29-2002, 02:50 AM
anantatman anantatman is offline
Web Hosting Evangelist
 
Join Date: Jan 2002
Posts: 453
haha yeah, didn't quite link those in my head there, thanks

Reply With Quote
  #7  
Old 08-29-2002, 01:26 PM
DivaX007 DivaX007 is offline
New Member
 
Join Date: Aug 2002
Posts: 2
Smile

thanks SOOOO much, guys. especially studio64!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?