Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 07-08-2005, 09:50 AM User Rating
Pinkasaurus's Avatar
Experienced Talker

Posts: 47
Trades: 0
I wanted to know how I could create something like the bellow so that my users could rate pictures and add comments? I searched around for a bit but couldnt find anything of any help. I knew that someone here could help me.





Thanks
__________________

Please login or register to view this content. Registration is FREE
Pinkasaurus is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-08-2005, 10:26 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
You will need some sort of server side language(Preferably ASP.NET, but could also use others such as ASP, PERL, ISAPI or PHP), and somewhere to store to store the ratings (like a database or a text file).

Talk to your web host and see what server side language is available, if any - you should be able to find rating scripts available everywhere.. (try google, hotscripts). Failing that, you could write one without too much trouble.

- Mina
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 07-08-2005, 11:07 AM
Enigmatic's Avatar
Registered User

Posts: 86
Location: No Fixed Abode
Trades: 0
As an example:

PHP Code:
##----[ TABLE STRUCTURE ]----##

CREATE TABLE `ratings`
 (
  userid int() auto_increment NOT NULL default '',
  imageid int() NOT NULL default '',
  userRating int() NOT NULL default '',
  comments varchar(255) default ''
 );


##----[ SQL ]----##

<?PHP

/*the code below assumes you already have a user db set up and sessions are registered*/
$sql mysql_query("INSERT INTO ratings (userRating, comments) VALUES ('$userRating', '$comments') WHERE userid =  '$userid' AND imageid = '$imageid'");

?>


##----[ EXAMPLE FORM ]----##

<html>
<head>
<title>Example Form</title>
<style type="text/css">
.text
  {
   font-family:Verdana, Arial, Helvetica, sans-serif;
   font-size:10;
   font-weight:normal;
   color:#000000;
  }
.inputField
  {
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#000000;
font-size:10px;
font-wieght:normal;
border-color:#666666;
border-width:1px;
border-style:solid;
width:150px;
height:17px;
  }
.inputField
  {
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#000000;
font-size:10px;
font-wieght:normal;
border-color:#666666;
border-width:1px;
border-style:solid;
width:150px;
height:17px;
  }
.textArea
  {
font-family:Verdana, Arial, Helvetica, sans-serif;
color:#000000;
font-size:10px;
font-wieght:normal;
border-color:#666666;
border-width:1px;
border-style:solid;
width:150px;
height:50px;
  }
.button 
  {
   font-family:Verdana, Arial, Helvetica, sans-serif;
   font-size:10;
   color:#000000;
   height:17px;
   width:50px;
   border-color:#666666;
   border-width:1px;
   background-color:#CCCCCC;
  }
</style>
</head>
<body>
<table class="text">
<tr>
<td><u>Example Form</u></td>
</tr>
</table>
<form name="signup_form" action="<?PHP echo $_SERVER['PHP_SELF'?>"> method="post">
<table class="text">
<tr>
<td align="right">Rating:</td>
<td><input type="text" name="userRating" class="inputField" max="1"></td>
</tr>
<tr>
<td align="right" valign="top">Comments:</td>
<td><textarea name="comments" class="textArea"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="right"><input type="reset" class="button" value="Reset"> &nbsp; <input type="submit" class="button" 

value="submit"></td>
</tr>
</table>
</form>
</body>
</html>
Enigmatic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to User Rating
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19362 seconds with 12 queries